Modify

Opened 7 months ago

Closed 5 months 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)

detect_wrong_oneway_relation.patch (6.1 KB) - added by taylor.smock 7 months ago.
Initial patch for showing oneways in the wrong direction of a relation.
detect_wrong_oneway_relation_v2.patch (27.5 KB) - added by taylor.smock 5 months ago.
Add tests for detecting oneways that may be problematic in a relation (doesn't currently work with oneways converging onto a two-way).
detect_wrong_oneway_relation_v3.patch (27.9 KB) - added by taylor.smock 5 months ago.
Look for oneways that are probably going the wrong direction
detect_wrong_oneway_relation_v4.patch (27.9 KB) - added by taylor.smock 5 months ago.
Fix compilation warnings (complaints about creating explicit && || precedence)

Download all attachments as: .zip

Change History (9)

Changed 7 months ago by taylor.smock

Initial patch for showing oneways in the wrong direction of a relation.

comment:1 Changed 6 months ago by Don-vip

Keywords: relation direction added

comment:2 Changed 6 months ago by Don-vip

Milestone: 19.05

Can you please add a new test to WayConnectionTypeCalculatorTest for the added code?

Changed 5 months ago by taylor.smock

Add tests for detecting oneways that may be problematic in a relation (doesn't currently work with oneways converging onto a two-way).

Changed 5 months ago by taylor.smock

Look for oneways that are probably going the wrong direction

Changed 5 months ago by taylor.smock

Fix compilation warnings (complaints about creating explicit &&
precedence)

comment:3 in reply to:  2 Changed 5 months ago by taylor.smock

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).

comment:4 Changed 5 months ago by Don-vip

It does, but you're right to ping me, I forgot about this ticket.

comment:5 Changed 5 months ago by Don-vip

Resolution: fixed
Status: newclosed

In 15076/josm:

fix #17501 - Detect if a oneway in a relation may be going in the wrong direction (patch by taylor.smock)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.