Modify

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#12111 closed enhancement (fixed)

[Patch] Detect when "to" and "from" are the same in turn restrictions

Reported by: naoliv Owned by: team
Priority: normal Milestone: 16.01
Component: Core validator Version:
Keywords: Cc:

Description

I don't know how to do this in MapCSS (nor if it's possible), but could JOSM warn when to and from in turn restrictions (type=restriction relations) are the same?

JOSM:

Revision: 9017
Repository Root: http://josm.openstreetmap.de/svn
Relative URL: ^/trunk
Last Changed Author: bastiK
Last Changed Date: 2015-11-16 23:07:49 +0100 (Mon, 16 Nov 2015)
Build-Date: 2015-11-17 02:32:33
URL: http://josm.openstreetmap.de/svn/trunk
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last Changed Rev: 9017

Identification: JOSM/1.5 (9017 pt_BR) Linux Debian GNU/Linux unstable (sid)
Memory Usage: 509 MB / 3641 MB (333 MB allocated, but free)
Java version: 1.8.0_72-internal, Oracle Corporation, OpenJDK 64-Bit Server VM
VM arguments: [-Dawt.useSystemAAFontSettings=on]

Example is attached.

Attachments (2)

example.osm (714 bytes) - added by naoliv 4 years ago.
12111.patch (1.1 KB) - added by simon04 4 years ago.

Download all attachments as: .zip

Change History (16)

Changed 4 years ago by naoliv

Attachment: example.osm added

comment:1 Changed 4 years ago by naoliv

Summary: DetectDetect when "to" and "from" are the same in turn restrictions

comment:2 Changed 4 years ago by Klumbumbus

The same way as from and to member is valid for no_u_turn restrictions (if the road is not mapped with a separate way in each direction).

comment:3 Changed 4 years ago by naoliv

Right, maybe in some place it could be valid or needed.
But could JOSM offer a way to detect (even if it doesn't warn) this?

I basically want to clean this: https://github.com/openstreetmap/iD/issues/2527

Osmose also has a test for this: http://osmose.openstreetmap.fr/en/map/#item=3180&class=31801 (from https://github.com/osm-fr/osmose-backend/issues/20)

comment:4 Changed 4 years ago by pl71

You can check turn restrictions here: http://map.comlu.com with shortcut to JOSM remote.

comment:5 in reply to:  4 Changed 4 years ago by naoliv

Replying to pl71:

You can check turn restrictions here: http://map.comlu.com with shortcut to JOSM remote.

But it needs to zoom in a small area to view the relations.
I would like to download every relation from a specific region in JOSM and validate then.
For now I will script something that verifies when the id in from is the same as to, directly in the XML.

comment:6 Changed 4 years ago by anonymous

You can change required zoom level up to 11. See Settings icon at the bottom-right corner.
And be careful with xml files.

Changed 4 years ago by simon04

Attachment: 12111.patch added

comment:7 Changed 4 years ago by simon04

Milestone: 16.01
Summary: Detect when "to" and "from" are the same in turn restrictions[Patch] Detect when "to" and "from" are the same in turn restrictions

attachment:12111.patch displays all from==to restriction relations as information level validation.

comment:8 Changed 4 years ago by simon04

Resolution: fixed
Status: newclosed

In 9236/josm:

fix #12111 - Detect when "to" and "from" are the same in turn restrictions

comment:9 Changed 4 years ago by simon04

r9236 displays from == to non-no_u_turn restriction relations as warning.

comment:10 Changed 4 years ago by naoliv

Will attachment:12111.patch also be applied?

comment:11 Changed 4 years ago by simon04

r9236 is based on attachment:12111.patch – would you want the information level infos about no_u_turn with from == to?

comment:12 Changed 4 years ago by naoliv

If possible, yes :-)

comment:13 Changed 4 years ago by simon04

In 9244/josm:

see #12111 - Detect when "to" and "from" also in no_u_turn restriction relations

Those will be reported as informational warning messages.

comment:14 Changed 4 years ago by naoliv

Thanks!

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.