Route ignores "No Right Turn" restriction

Openstreetmap has this intersection as a “no right turn” yet the route ignores this.
Is this a bug or is there another way to ask the openrouteservice to respect this rule

Thank you for reaching out!

The reason for the observed behavior it is that the default routing algorithm which is optimized for speed does not support turn restrictions. This algorithm is used when no route preferences are specified.

Turn restrictions are respected once you enable some filters, for example try Avoid road types: ferries . This of course doesn’t have any direct influence on this particular route, however, it triggers another algorithm at the backed which resolves turn restrictions correctly, see here.

When querying the API directly one can force the latter algorithm by appending to the request optimized=false parameter without the need of specifying any custom route preferences.

Cheers,
Andrzej

Brilliant - Thankyou, This is a fantastic service you have here, Will donate something to the project next week.

1 Like

Hello Andrzej,

this makes sense if you use the api directly but for the users of the ORS app OpenRouteService route planner - directions, isochrones and places it is not logical to set a restriction to follow turn restrictions.
The app should have “optimized=false” set as default.

Greetings
Heinz

i cannot see any difference when clicking the link provided by andrzej. it is still turning right when avoiding ferries

This is because with ORS v6 update we don’t support turn restrictions on our maps client anymore. This temporary shortcoming will be addressed in one of the upcoming releases, so stay tuned.

Cheers,
Andrzej

Hi @andrzej
I think I have similar issue https://maps.openrouteservice.org/directions?n1=-7.277596&n2=112.741005&n3=18&a=-7.274186,112.742059,-7.277586,112.740326&b=0&l6=1&l5=1&l1=1&c=0&k1=en-US&k2=km where there is a no_right_turn relation here https://www.openstreetmap.org/relation/7870845 but the ORS maps UI still ignore it. Any updates on when this will be solved or other workaround to accommodate turn restrictions?

Thank you
Regards

Iqnal

Hi Iqnal,

Thanks for reaching out! In fact, we made some progress over the past months on re-introducing turn restrictions to our public API and we hope to release it pretty soon.

Cheers,
Andrzej

I hope this is implemented soon… I fail to see the usefulness of directions which don’t respect no-turn signals, at least for vehicle profiles.
Anyhow, many thanks for all the great work you do!

Actually, support for turn restrictions has been implemented just recently and is currently awaiting to be merged and released, see PR#866.

Excellent! …and at an amazing timing for my project. Thanks!