Dijkstra’s algorithm weighted by travel time in OSM networks

Finding the fastest and shortest path with the OSMNX 1.6

Bryan R. Vallejo
Towards Data Science
7 min readOct 10, 2023

--

Image by the Author. Fastest route (red) and Shortest route (orange) in Morocco example

The Shortest Path (Dijkstra’s) algorithm can be applied in OSM networks like driving, bike, and pedestrian, to find the most optime route between origin and destination. But, the algorithm calculates in the network the shortest routes based on distance and it does not…

--

--

Geospatial Scientist | @BryanRVallejo | Supporting GIS community to automate spatial analysis | Get full access to my stories: https://bit.ly/3yjLsSL