taxicab icon indicating copy to clipboard operation
taxicab copied to clipboard

Shortest path does not respect road directions

Open leeke2 opened this issue 1 year ago • 0 comments

The orig and dest partial edges don't seem to respect road directions. Code to reproduce the error below:

import osmnx as ox
import taxicab as tc

orig = (1.43789201937501, 103.80334162830194)
dest = (1.43472623786722, 103.80188755233279)
bounds = (1.4442235823905898, 1.4283946748516403, 103.80624978024024, 103.79897940039449)

G = ox.graph_from_bbox(*bounds, network_type='drive_service', simplify=True)
route = tc.distance.shortest_path(G, orig, dest)

tc.plot.plot_graph_route(G, route)

Correct routing on Google Maps: https://www.google.com/maps/dir/1.4378889,103.8033333/1.43472623786722,+103.80188755233279/@1.4359626,103.7991883,17z/data=!3m1!4b1!4m7!4m6!1m0!1m3!2m2!1d103.8018876!2d1.4347262!3e0

leeke2 avatar Mar 14 '23 05:03 leeke2