Avoid u-turns on double carriage roads

Hi

I have a problem where the algorithm is making u-turns on roads that on OSM are two separate roads but in reality it is one road with a solid island in the middle. See below picture

For my understanding are these interpreted as two totally separate roads and not two sides of the same road?

While I understand this may not be a u-turn because of the structure of the data, is there still a way to limit this kind of behavior unless totally necessary?

Thanks for any assistance.

Is the U-Turn not allowed in this case?

You could increase the U-Turn penalty if you prefer to avoid U-turns

Hi @Andre_Ark

I have tried setting a very high u-turn value, I believe the problem here is that grapphopper views them as two separate roads, i.e. it is not saying do a u-turn onto rivonia road, it is saying turn right off rivonia, and then right again onto rivonia.

May I ask what the problem is? If this route is allowed its probably the fastest route. If its not a U-Turn then there is no way to disable this behavior since its just looking for the fastest route.

is there still a way to limit this kind of behavior unless totally necessary?

Yes, you can map it as a turn restriction: Relation:restriction - OpenStreetMap Wiki i.e. a turn restriction with a “via” way.

Thank you @karussell

Would I have to do this in the OSM data or is there a way to limit this behavior on the graphopper engine ?

Yes, in the OSM data. See the link.