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.



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