-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Implement exclude flags for CH #6821
-
Hello, I would like to know if the CH algorithm already supports the exclude parameter.
I set exclude = ferry when using it. If there is only one route and it contains a link with the ferry attribute, then this route will be recalled.
Is this normal? thank you.
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 5 comments
-
Yes, it's supported by the CH algorithm. You need to make sure that excludable is set in the Lua profile, like it is by default here:
https://github.com/Project-OSRM/osrm-backend/blob/master/profiles/car.lua#L123-L128
That setting will cause OSRM to generate multiple versions of the CH graph, each graph will have those edges removed. At query time, you can do exclude=ferry or exclude=motorway or exclude=toll and OSRM will perform the route calculation on the graph prepared for that option.
Every excludable you add to the Lua script makes the dataset bigger and causes processing to take longer.
Beta Was this translation helpful? Give feedback.
All reactions
-
But I set the excludable parameter in bicycle.profile and specified exclude = ferry when calling the interface, and the engine still returns a result containing ferry. What is the reason for this?
image
Beta Was this translation helpful? Give feedback.
All reactions
-
Did you re-run osrm-contract after updating the bicycle.lua file? That is a required step.
Beta Was this translation helpful? Give feedback.
All reactions
-
yes,I already run osrm-contract with the bicycle.lua file.
I also want to know the key of ferry is route or highway?
Beta Was this translation helpful? Give feedback.
All reactions
-
Hi @hahaking119 , Did you manage to do this? Because i'm trying to exclude unpaved, but is not working.
Beta Was this translation helpful? Give feedback.