Modify

Opened 6 years ago

Closed 4 weeks ago

Last modified 4 days ago

#10932 closed enhancement (fixed)

[Patch] Warn if way has 'turn:lanes=*' but lacks 'lanes=*' tag.

Reported by: rickmastfan67 Owned by: team
Priority: normal Milestone: 20.07
Component: Core validator Version: latest
Keywords: lanes lanes-tagging Cc:

Description

Please throw up a validator warning if a way happens to have 'turn:lanes=*', but doesn't have 'lanes=*'. This is always an error since routers that need the 'lanes=*' tag to be able to properly use the 'turn:lanes' tag. An example would be Way 294921123 (https://www.openstreetmap.org/way/294921123).

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2015-01-05 02:33:53
Last Changed Author: Klumbumbus
Revision: 7925
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Relative URL: ^/trunk
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2015-01-04 18:11:11 +0100 (Sun, 04 Jan 2015)
Last Changed Rev: 7925

Identification: JOSM/1.5 (7925 en) Windows 7 64-Bit
Memory Usage: 354 MB / 1820 MB (179 MB allocated, but free)
Java version: 1.7.0_71, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Dataset consistency test: No problems found

Plugins:
- ImageryCache (30892)
- OpeningHoursEditor (30892)
- buildings_tools (30892)
- measurement (30892)
- mirrored_download (30892)
- notes (v0.9.5)
- osmarender (30892)
- reverter (30892)
- turnrestrictions (30892)
- undelete (30892)
- utilsplugin2 (30892)

Attachments (2)

josm_10932.patch (4.9 KB) - added by skyper 5 weeks ago.
patch
josm_10932_v2.patch (4.9 KB) - added by skyper 4 weeks ago.
version 2

Download all attachments as: .zip

Change History (13)

comment:1 in reply to:  description Changed 6 years ago by Klumbumbus

Replying to rickmastfan67:

Please throw up a validator warning if a way happens to have 'turn:lanes=*', but doesn't have 'lanes=*'. This is always an error since routers that need the 'lanes=*' tag to be able to properly use the 'turn:lanes' tag.

lanes=* is not really required, if turn:lanes is present, because you can calculate the number of lanes by
the number of | in turn:lanes +1

Also note that the lanes key counts only lanes for motorized traffic, while the :lanes suffix counts also e.g. bicycle lanes. So the number in lanes can be different from the number of lanes in turn:lanes. See Key:lanes and Lanes#Crossing_with_a_designated_lane_for_bicycles

comment:2 Changed 6 years ago by rickmastfan67

But what would happen if a user is trying to tag the turn:lanes, but instead of using | to separate the lanes, they use ; for every part of the tag? Here's a case when the lanes=* tag would be a fail safe, at least for a oneway highway like highway=motorway.

And how about if there's a segment of highway that has 5 lanes, but since the user didn't add the lanes=*, lanes:forward=*, & lanes:backward=* tags, but only added a turn:lanes:forward tag?

There honestly should be at minimum a warning in the 'Other' section. But IMO, it would be better off in the 'Warnings' section.

comment:3 Changed 6 years ago by Don-vip

Type: defectenhancement

comment:4 Changed 6 years ago by Aun Johnsen <lists@…>

same can be said about destination:lanes

comment:5 Changed 4 months ago by skyper

I would say, a warning for ways with *:lanes=* without lanes=* and for *:lanes[:*]:forward/backward=* without lanes:forward/backward=* does not harm.

comment:6 Changed 4 months ago by skyper

Keywords: lanes lanes-tagging added

Changed 5 weeks ago by skyper

Attachment: josm_10932.patch added

patch

comment:7 in reply to:  5 Changed 5 weeks ago by skyper

Summary: Validator: Warn if way has 'turn:lanes=*' but lacks 'lanes=*' tag.[Patch] Warn if way has 'turn:lanes=*' but lacks 'lanes=*' tag.

Replying to skyper:

I would say, a warning for ways with *:lanes=* without lanes=* and for *:lanes[:*]:forward/backward=* without lanes:forward/backward=* does not harm.

Please, find attached patch file which adds the warning.

Changed 4 weeks ago by skyper

Attachment: josm_10932_v2.patch added

version 2

comment:8 Changed 4 weeks ago by skyper

I did not like the message, so, version 2 is a bit nicer. Still do not really no how to represent all tags with commas in between. Currently only the last match of the regex is represented in the message.

comment:9 Changed 4 weeks ago by Klumbumbus

Resolution: fixed
Status: newclosed

In 16769/josm:

fix #10932 - Warn about ways with *:lanes but without lanes (also with :forward, :backward and :both_ways extensions) (patch by skyper, modified)

comment:10 Changed 4 weeks ago by Klumbumbus

Milestone: 20.07

comment:11 Changed 4 days ago by skyper

See #19609 for some false positive and as follow up.

Last edited 4 days ago by skyper (previous) (diff)

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.