nrenner / brouter-web

Web client for BRouter, a routing engine based on OpenStreetMap
https://brouter.de/brouter-web/
MIT License
347 stars 65 forks source link

Adding nogo-areas prompts more route recalculation than necessary #789

Open sjakobi opened 4 months ago

sjakobi commented 4 months ago

Sample route: https://brouter.de/brouter-web/#map=6/53.022/9.108/osm-mapnik-german_style&lonlats=13.382694,52.48947;12.34979,51.337476;12.908787,50.840546;11.041492,49.444397;8.625121,49.984782&profile=vm-forum-liegerad-schnell

If I now add a nogo-area that cuts only one of the route segments, say Leipzig–Chemnitz, nevertheless all of the route segments are recalculated.

My suggestion is that the program should first check which segments are cut by the added nogo-area and recalculate only those. This should be much faster, especially if the profile is computationally demanding or when the added nogo-area doesn't intersect with the route at all.