Create loop edges for nodes tagged as highway=turning_circle or turning_loop #2761
+147
−6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The node (!) tags
highway=turning_circle
andhighway=turning_loop
are quite popular in OSM and can be used as an indicator for places where it is easy to turn around your vehicle. They are often used instead of an actual 'loop' of OSM ways at the end of dead-end streets and also rendered as such, like here at the end of Friedrich-Ebert-Straße:So far we did not use these tags and simply applied the standard u-turn costs for every junction and dead-end. We also did not consider turning around at nodes tagged as
turning_circle
orturning_loop
that were not junctions (somewhere in the middle of a road).In this PR I modified the OSM import such that helper 'loop' edges (to be more precise: one extra node with two edges) are added to the graph that represent the turning_circle/loop. Without further changes this would mean that there is no turning penalty when we do a 'u-turn' at these nodes. This means that the routing algorithms will prefer turning around at these nodes compared to turning around at junctions and other dead-ends.
I'm not yet sure if this is an improvement, because there can be cases where suggesting to go into some residential area for example, just to turn around at the next turning_circle, makes little sense. Then again, it could easily be better than simply suggesting to turn around at the next 'junction', which could just as well be a crossing with some random footway etc.
todo:
c.f. this and the following comments: #2139 (comment)