Project-OSRM / osrm-backend

Open Source Routing Machine - C++ backend
http://map.project-osrm.org
BSD 2-Clause "Simplified" License
6.26k stars 3.31k forks source link

Expose location tags in turn_function #5141

Closed danpat closed 2 weeks ago

danpat commented 6 years ago

Over in https://github.com/Project-OSRM/osrm-backend/issues/2322#issuecomment-404802575, it was asked how to add penalties for border crossings so that routes tended to stay within countries.

This can be done by identifying tagged barrier=border_control nodes.

However, not all borders have these, and you may want to do routing other kinds of administrative boundaries, like counties, cities, etc.

We have support for the --location-dependent-data feature, which allows you to add GeoJSON properties to ways before they're handed to process_way. To support adding penalties at area boundaries, we could expose those same tags as something like turn.source_location_tags and turn.target_location_tags in process_turn, which would allow you to identify when a turn crosses a boundary defined in a GeoJSON you supply.

github-actions[bot] commented 1 month ago

This issue seems to be stale. It will be closed in 30 days if no further activity occurs.