Implementing Dijkstra's Algorithm for shortest path on a map.
Maps - Map is taken/exported from OpenStreetMap while is a free and open service to use.
The file exported is in .osm format which is used in the program.
Algorithm - For Shortest Path we are using Dijkstra's Algorithm.
The connection between nodes are stored in a Nodes x Nodes adjacency Matrix.
There are 2 files:
- .py File can be compiled and run using ide.
- .ipynb File open it in jupyter or colab and then compile all the cells.
When Compiled the map is analysed and all the nodes are stored in a list.
Then an adjacency matrix of node x node is generated and mapped.
In this at first all the nodes are assumed start point and a path to other nodes are generated.
Then we ask user for the source node using a map automatically opened in a browser.
(Nodes are in green dots)
After that a multiple destination nodes are displayed to the user in the browser.
(Blue dot is the source and red dots are the possible destination)
After the user selects a destination, the shortest path is displayed in the map.
The whole process is running in the console when the .py file is compiled.