I'm experimenting with my own routing system and have encountered a weird situation that I don't know how to handle. Basically, an only straight on turn restriction in which the from and to ways are identical (the way is a 2 way trunk), you can find the relation here: https://www.openstreetmap.org/relation/6381739 I understand that the relation is attempting to prevent the user from getting onto the east bound service road when travelling west bound on the trunk road. But the mandatory restriction is preventing my routing engine from entering the service road when coming from the west (which it should be able to do). What is the correct way to handle this? Thanks asked 18 May '21, 18:02 Walter |
As per TZorn and https://ahorn.lima-city.de/tr/ which appears to show that there are issues with these restrictions, I'll be simply disregarding restrictions that have the same from and to way when building the routing network. answered 19 May '21, 18:20 Walter |
The turn restriction is incorrectly mapped. To avoid ambiguity the from and to ways need to terminate at the via node. The way should have been split. This is also documented on the wiki (albeit only in a footnote).
I have no clue if there is any meaningful way to resolve the ambiguous turn restriction in the router. Maybe you should just ignore such wrong restrictions. On the other hand Graphhopper seems to have found a way to interpret the situation correctly.