osrm-backend icon indicating copy to clipboard operation
osrm-backend copied to clipboard

route around arbitrary barrier polygons

Open clintharris opened this issue 11 years ago • 10 comments

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.

clintharris avatar Jan 27 '14 20:01 clintharris

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.

woodbri avatar Jan 27 '14 20:01 woodbri

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

emiltin avatar Jan 27 '14 20:01 emiltin

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.

woodbri avatar Jan 27 '14 21:01 woodbri

Correct, I was thinking dynamically at each request.

clintharris avatar Jan 27 '14 21:01 clintharris

duly noted

DennisOSRM avatar Jan 28 '14 11:01 DennisOSRM

+1

jpatel27b avatar Jan 30 '14 17:01 jpatel27b

related: #165

emiltin avatar Jan 31 '14 08:01 emiltin

+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.

kanflo avatar Feb 13 '14 20:02 kanflo

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.

ewenger avatar Apr 10 '20 20:04 ewenger

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.

AyushmanSaxenaLepton avatar Mar 12 '24 03:03 AyushmanSaxenaLepton