Project-OSRM / osrm-backend

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

Deleting/ changing prefered route in OSRM (waterway) #6556

Open NathanNguyen-Dev opened 1 year ago

NathanNguyen-Dev commented 1 year ago

Greetings, I am trying to make a routing calculation but for some business reason, the path that is taken while calling OSRM is not the preferred path. Is there a way to configure OSRM to delete a specific pathway, or changes it to an alternative route?

For example in this picture, I would like OSRM to always take the path below (which goes through Iloilo -> Bacaloid -> Cebu) and avoid having to go round trip (moving north and going to Boco(Cebu)) image

aa0d commented 1 year ago

If I understand you correctly, you don't want the route to be using the ferry in the north from Bogo to Botongon. To alternate OSRM's behavior for specific highway/highway types you can build a custom version of car.lua. There you can for example disable the use of ferries or set a certain speed for a specific way. For more information refer to: https://github.com/Project-OSRM/osrm-backend/blob/master/docs/profiles.md

NathanNguyen-Dev commented 1 year ago

Thank you for the suggestion, I found a more straightforward way to make edit locally the .osm.pbf file by deleting the unwanted waterway and merging it back using osmium.

github-actions[bot] commented 1 week ago

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