I want to ask if there is a way to find the accurate shortest path between 2 coordinates. The 2 coordinates are (-33.889606, 151.283306), (-33.889927, 151.280497) as shown in the picture. The black path is the ideal path, and the red one uses get_nearest_node. Here are the codes: import folium import osmnx as ox import […]
- Tags 'travel_time') route_map = ox.plot_route_folium(G, (-33.889606, (-33.889927, 151.280497) as shown in the picture. The black path is the ideal path, 151.280497)) route = nx.shortest_path(G, 151.283306), 151.283306)) dest = ox.get_nearest_node(G, and the red one uses get_nearest_node. Here are the codes: import folium import osmnx as ox import networkx as nx ox.config(use_cache=True, dest, dist=3000, I want to ask if there is a way to find the accurate shortest path between 2 coordinates. The 2 coordinates are (-33.889606, log_console=True) G = ox.graph_from_point((-33.889606, network_type='drive') G = ox.speed.add_edge_speeds(G) G = ox.speed.add_edge_travel_times(G) orig = ox.get_nearest_node(G, orig, route) route_map.save('test.html')