Opened 6 years ago
Closed 6 years ago
#17501 closed enhancement (fixed)
[PATCH] Detect if a oneway in a relation may be going in the wrong direction
Reported by: | taylor.smock | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 19.05 |
Component: | Core | Version: | |
Keywords: | relation direction | Cc: |
Description
A relation (e.g., bus relations) should be navigable throughout the entire way. However, a "oneway" that connects two different ways but is in the wrong direction will not show as an issue when looking through the JOSM relation edit window.
This patch checks if a way is a oneway and whether or not it follows the direction of the relation.
If the oneway is going in the wrong direction, the line indicating connectivity is drawn in as a different color along with the surrounding ways that depend upon that direction for connectivity.
Example:
Oneway (->) -> oneway (->) -> oneway (->) is probably ok.
Oneway (->) -> oneway (<-) -> oneway (->) is probably not ok.
twoway -> oneway (<-) -> twoway is probably not ok.
twoway -> oneway (->) -> twoway is probably ok.
Since this is really only useful to route relations, I have currently set the different color as light grey (so boundary relations/turn restrictions don't have something that immediately screams WRONG).
Attachments (4)
Change History (9)
by , 6 years ago
Attachment: | detect_wrong_oneway_relation.patch added |
---|
comment:1 by , 6 years ago
Keywords: | relation direction added |
---|
follow-up: 3 comment:2 by , 6 years ago
Milestone: | → 19.05 |
---|
Can you please add a new test to WayConnectionTypeCalculatorTest
for the added code?
by , 6 years ago
Attachment: | detect_wrong_oneway_relation_v2.patch added |
---|
Add tests for detecting oneways that may be problematic in a relation (doesn't currently work with oneways converging onto a two-way).
by , 6 years ago
Attachment: | detect_wrong_oneway_relation_v3.patch added |
---|
Look for oneways that are probably going the wrong direction
by , 6 years ago
Attachment: | detect_wrong_oneway_relation_v4.patch added |
---|
precedence) |
comment:3 by , 6 years ago
Replying to Don-vip:
Can you please add a new test to
WayConnectionTypeCalculatorTest
for the added code?
I've added a test and fixed some errors that it brought to light, as indicated in the above patches.
This comment is assuming that trac isn't sending emails out for new attachments (if it is, then this comment is effectively replicating a few emails).
Initial patch for showing oneways in the wrong direction of a relation.