osrm-backend
osrm-backend copied to clipboard
route around arbitrary barrier polygons
Would be awesome if, when requesting a routing calculation, we could specify an arbitrary polygon that the route is not allowed to intersect. This would make it much easier to incorporate things like traffic data or temporary road closures into routing.
Or an arbitrary polyline that represents barrier like an earthquake fault line or other barrier. The point is it does not need to be a polygon.
you mean dynamically at each request, or when data is prepared? during prepare you can do it like this: https://github.com/DennisOSRM/Project-OSRM/issues/546?source=cc#issuecomment-26610077
I think that it probably needs to take place route time rather than prepare time for the disaster response management use case and the traffic use case. Both of these use cases deal with rapidly changing data. I think the avoidance case is a little easier to deal with because you can check if a new segment/node being evaluated is crossing or landing in an avoidance area then you don't add it to the wave front in the solver which forces another path to have a higher priority which will eventually route around the avoidance area or fail to find a route.
The traffic use case of changing the weights is harder or anti-contraction because the contraction is based on the costs if I'm not mistaken.
Correct, I was thinking dynamically at each request.
duly noted
+1
related: #165
+1 from me, this would be a useful feature indeed. Not having looked at the actual code to see where this could fit in, would it not be possible to locate the vertices in the route graph corresponding to the area in question and mark these as non passable during the routing call? Not globally non passable of course as we would not want to affect other routing operations.
I'm currently planning a cross-country route through COVID-19 (got stuck on vacation and have a letter stating that I need to get back for essential duties). It would be really interesting to take a county-by-county map, threshold it and make an avoidance-zones dataset and then find the best route avoiding highly-infected areas.
Was someone able to solve the challenge to route around arbitrary barrier polygon. I am also working on same, it really be a huge help if anyone of you could help me out.