# Prohibit U-Turn onto motorway/Speedway

Hello everyone,
I am trying to solve the following problem in GH and was hoping to find someone working on it allready.
The problem comes when you want to navigate onto a speedway/Motorway(German Schnellstraße) in certain situations.(see picture)

The intresting thing is that when you switch to the motorcicle profile the problem dissapears.(see below)

I am still trying to get my head around how to best tackle this issue and was hoping to get some help on this issue.

At the moment I am trying to solve this by adding a function in the DijkstraBidirectionRef class in the place where I think the wheigting is calculated. There I am first trying to get the math right to identify a u-turn (delta value of above 2.96 as used in the path class when calculating the instructions). So I am using the edgeIterator to get the Geometric Points and generate this way a pointlist. With the point list I am trying to calculate the correct orientations from point to point and check once the value reaches 2.96. I compare them to the values I have in the instructions but my calculated orientation values never seem to match the ones I get on the other side in the instructions calculation.

I hope this is the right way to go for this problem and that I am in the right place for it as I am still new to GH and there are a few corners of the code where I am not too confident in my understanding.

Of course idealy I would like to find a solution for this problem which would be implemented no matter which algorithm is used but I wouldnt know where to do that atm. And I would have liked to know what makes the problem dissapear in the different profiles in the hopes to maybe duplicate this (probably unintentional) solution, but couldn’t figure that out either so I tried to solve the issue best as I could.

In any case I would really apreaciate any help with this problem or maybe some pointers in a (better/right) direction

thanks a lot
MM

If there is a turn restriction at this node in OSM then GraphHopper considers this if you import this data e.g.

``````graph.flag_encoders=car|turn_costs=true
``````

and turn of CH in the request:

`&ch.disable=true`

as currently not supported from this mode: https://github.com/graphhopper/graphhopper/issues/270