Route calculated using illegal turn

Hi!
I got response from user that route is showing to make a left turn where it is not allowed. I checked on OpenStreet map data and if I understand it right, that crossroad is set correctly.

Showing

turn:lanes through

Is there some parameter that I need to change to change to account for these illegal turns? Or that crossroad need a restriction to be added, something like

restriction:no_left_turn


If contraction hierarchies (CH) is enabled on your service, ORS uses it by default, because it is the most performant routing algorithm. CH does not support turn restriction. You can circumvent this, when the request contains some avoidables like avoid features or avoid polygons. Then ORS falls back to a slower but more flexible algorithm, that also supports turn restrictions.

3 Likes

Thanks for reply. How do I disable contraction hierarchies? It is kind of useless to get route that user cannot do. I see use for it for emergency services that can do illegal turns. But for my use it is not usable. Is it In API request or server side settings?

Looks like adding
"avoid_features": ["ferries"]
solves the problem.

2 Likes

Yes, that’s what I meant.

If you still like to disable CH, it is a server setting for the vehicle profile.
If you set build.methods.ch.enabled: false in your profile settings, CH will be disabled. Maybe you need to rebuild the graphs.

See:

3 Likes