Open Metystes opened 4 years ago
I've made some research on the topic and there is a few solutions that allows you to find the best route. For us the best would be such API that allows adding additional conditions with air pollution.
Existing routine engines under the hood transforms maps into network with nodes and edges and use A (Dijkstra algorithm with heuristic) or D for finding the shortest path in the network. However, in order to achieve high quality some additional conditions are applied such as space crossing, traffics and laws (eg. one-round streets, speed limits).
Right now 2 ways of implementation comes to my mind:
However, as mentioned above, the best way would be finding created API with routing engine that allows for additional conditions. In our case it would be air pollution on every road/edge.
Interesting APIs:
Here some nice description of routing engine: https://wiki.openstreetmap.org/wiki/Routing
I found very interesting example that creates routes that avoids flooded area. The information about flood is made from twitter: https://openrouteservice.org/example-avoid-flooded-areas-with-ors/
Exactly the same problem as we have: https://stackoverflow.com/questions/40923369/can-python-do-custom-route-planning-or-do-i-need-to-rely-on-an-api/41876006#41876006
Also, generating route based on selected coordinates: https://docs.mapbox.com/help/tutorials/get-started-map-matching-api/
Another approach to routing: https://jakobmiksch.eu/post/openstreetmap_routing/
Road planning algorithm that minimize air pollution exposure.