Repository navigation
Description
Describe the bug
This feels like a bug, but perhaps I am misunderstanding things. I have been tinkering with GraphHopper for a while, but I can't fully understand how GraphHopper handles OSM turning points.
My opinion is that GraphHopper is not handling OSM turning points correctly.
Here, turning points are defined to be nodes with highway=turning_circle or highway=turning_loop or highway=mini_roundabout, or anything equivalent that I am not aware of.
To Reproduce
Consider the following live example:
Note: this is a valid path because turn restrictions etc are correctly considered.
Expected behavior
While the above was valid, I do not think it was correct. It confuses me that GraphHopper does not consider the following path:
It is shorter, and should obviously be comparable to the un-forced solution. (Note that both roads have max_speed=50 so the shorter one should be better.)
This is most definitely related to how GraphHopper currently handles "sharp turns" (see #2139).
While prior discussion is fruitful, I would like to add that, perhaps we forgot about turning points.
We put a lot of effort to deal with unauthorized u-turns, and from my current understanding, the current solution revolves around the "u-turn cost" concept, which make sense for "usual" u-turns. There aren't usually any space to do these "usual" u-turns, so this usually requires the driver to do a "T-shaped maneuver" (don't know the proper term) like this to turn around:
This can be tedious and time-consuming depending on the skill level of the driver; alternatively, this can be time-consuming because modern vehicles often use a safe (aka very low) speed to drive in reverse. By adding a high cost to paths that are doing these "usual" u-turns, we can avoid them, which is correct.
However, for OSM turning points, the roads are actually built to have extra space for turning around, so the turning around is simply trivial, like this:
Just like that, and the u-turn is complete. It does not make sense to impose any u-turn cost for these dedicated turning points. Even if a cost has to be applied, the cost should be applied at a discount.
In other words, these turning points are like mini-roundabouts. When actual roundabouts have no applied u-turn costs, it makes excellent sense that these turning points should also have no applied u-turn costs.
System Information
Live website.
Activity
easbar commentedon Jul 28, 2025
Yes, GraphHopper does not consider
highway=turning_circleso far. See #2761