GraphHopper supports turn restrictions. Currently, it is not possible to use turn restrictions with the 'speed mode' (contraction hierarchies), but it's possible using the 'hybrid mode' (landmarks) and with the 'flexible mode', see this link for details about the different modes. Turn restrictions are crucial for correct vehicle navigation and help to avoid forbidden turns.
Without turn restrictions (the turn is not allowed):
Turn restrictions have to be enabled on a vehicle basis. To enable it for one vehicle add
|turn_costs=true
in the config, for example: graph.flag_encoders=car|turn_costs=true
.
Turn restrictions are not available for every vehicle as they have low relevance
for some vehicles like foot
.
If you enabled the 'speed mode' on import e.g. with prepare.ch.weightings=fastest
in the configuration, then you'll
need to disable the 'speed mode' per request by adding ch.disable=true
as URL parameter.