Using a cypher function shortespaththat you cannot execute.
, , T2.
street shortestpath, , - , shortespath, , .
API , APOC (https://neo4j-contrib.imtqy.com/neo4j-apoc-procedures/#_graph_algorithms_work_in_progress) AStar dijkstraWithDefaultWeight.
Update
, apoc.algo.dijkstraWithDefaultWeight algo APOC:
MATCH (from:Way { id: $idFrom }),
(to:Way { id: $idTo })
WITH from, to
CALL apoc.algo.dijkstraWithDefaultWeight(from, to, 'T1>|T2', 'distance', 1) YIELD path, weight
RETURN path, weight