u_turn_costs on highways

I’m running my own instance of graphhopper. However, I need to work around some of the data being incorrect while the maps are updated. Specifically, the U-Turn is not allowed at a highway intersection.

My workaround involves enabling u_turn_costs, however it doesn’t seem to be having any effect. Despite adding various values to u_turn_costs, it still constructs and lists a U-Turn at that intersection.

My test route is this:

The first turn on the highway is listed as a U-turn.

My profile looks like:

  profiles:
   - name: car
     turn_costs: 
         vehicle_types: [motorcar, motor_vehicle]
         u_turn_costs: 5000
     custom_model_files: [car.json]

Why is my u_turn_costs value not having an effect at this intersection?

These u_turn_costs are only applied to cases where a route turns from one edge onto the exact same edge in the other direction.

That’s interesting. Is Graphhopper able to enforce intersectlons like this from OSM data where vehicles can turn right but are not allowed to U-turn?

I’ve noticed odd placements of no-u-turn symbols in the map data. Is that why there is a no u-turn symbol is at the end of the link road?

Or should there have been a no u-turn symbol at the first turn?

It’s possible that the no-u-turn restriction isn’t in the data because it’s a regional rule. No U-turns are allowed at any intersection of this type in that region.

Yes.

I’m not sure what you are referring to. Do you have a link to the intersection you are talking about and can you explain which no-u-turn symbols you mean?

That is an interesting case I don’t think we have considered so far. Do you have a source for this rule? At what type of intersections are u-turns generally forbidden? And maybe you have an example for an exception to this rule where a u-turn is allowed explicitly at such an intersection?