Opened 3 years ago
Last modified 3 years ago
#21351 new enhancement
Gratuitious warning on turn restrictions
Reported by: | Owned by: | team | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core validator | Version: | |
Keywords: | turn restriction | Cc: |
Description
Noticed with a no_left_turn restriction, that I get a warning, where the situation in fact is not ambiguous (https://www.openstreetmap.org/relation/12331685). The documentation https://wiki.openstreetmap.org/wiki/Relation:restriction is silent about VIA being an end-point, but indeed, the test is necessary, at least in part.
Pondering the issue, it appears to me, if FROM has VIA as an endpoint, the restriction is unambiguous already, so there is no need to check, if TO has VIA as an endpoint any more. https://josm.openstreetmap.de/browser/josm/trunk/src/org/openstreetmap/josm/data/validation/tests/TurnrestrictionTest.java#L266 - so I conjectured this:
+++ if (fromWay.isFirstLastNode(viaNode)) { return; } if (!toWay.isFirstLastNode(viaNode)) { …
Would that really do? Not sure: Will the return skip something? Will restrictions other than "no…turn" miss something? Probably an "else" before the second if might do as well.
PS: Motivation is, to not make the validator inspire people to split roads even more, than what they already are.
Attachments (0)
Change History (3)
comment:1 by , 3 years ago
comment:2 by , 3 years ago
Component: | Core → Core validator |
---|---|
Keywords: | turn restriction added |
comment:3 by , 3 years ago
I did report to osmose, where I occasionally visit, to polish my score there. I could have clicked "false positive" but remembered Nop from the German community saying, the documentation does not require this, and it creates lots of unneeded splits. Frodrigo must be on vacation. I will only post there again, once the concept is fully thought through though. My brain started to hurt, already for the no…turn restrictions.
I get your point, that splitting ways would be not needed but I think it is common practice and the wiki needs to be updated. At least the QA-tools OSM restriction analyzer, Keepright and Map of turn-restrictions all report this relation as error.