Modify

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)

detect_wrong_oneway_relation.patch (6.1 KB ) - added by taylor.smock 6 years 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 6 years 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 6 years ago.
Look for oneways that are probably going the wrong direction
detect_wrong_oneway_relation_v4.patch (27.9 KB ) - added by taylor.smock 6 years ago.
Fix compilation warnings (complaints about creating explicit && || precedence)

Download all attachments as: .zip

Change History (9)

by taylor.smock, 6 years ago

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

comment:1 by Don-vip, 6 years ago

Keywords: relation direction added

comment:2 by Don-vip, 6 years ago

Milestone: 19.05

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

by taylor.smock, 6 years ago

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

by taylor.smock, 6 years ago

Look for oneways that are probably going the wrong direction

by taylor.smock, 6 years ago

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

in reply to:  2 comment:3 by taylor.smock, 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).

comment:4 by Don-vip, 6 years ago

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

comment:5 by Don-vip, 6 years ago

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. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.