Modify

Opened 9 years ago

Closed 5 years ago

#11146 closed enhancement (wontfix)

Change "highway=*; construction=yes" to "highway=construction; construction=*"

Reported by: mkoniecz Owned by: team
Priority: normal Milestone:
Component: Core validator Version:
Keywords: template_report Cc:

Description

There are two methods for mapping road under construction[1]. One is [highway=construction; construction=*], second is [highway=*; construction=yes].

First method is significantly better as it is easier to process and not processing construction-related values is not resulting in wrong data (fail-safe tagging).

In addition construction=yes is used 3366 times with highway=*, highway=construction is used 79730 times[2].

[highway=construction; construction=*] also has wider support (for examples see JOSM and default map style).

[1] http://wiki.openstreetmap.org/wiki/Key:construction
[3] http://taginfo.openstreetmap.org/tags/highway=construction http://taginfo.openstreetmap.org/tags/construction=yes#combinations

I propose to change in validator [highway=*; construction=yes] to [highway=construction; construction=*].

Below I am attaching validator rule accomplishing this from my custom validator rules. Unfortunately due to #10913 it is impossible to write single rule for this task and it is necessary to have separate for every processed highway value.

Script used to generate this set of rules is attached as comment to validator rule below.

/*
generated by following ruby script:
puts '/' + '*'
puts 'generated by following ruby script:'
file = File.open(__FILE__)
puts file.read
puts
file.close
puts '*' + '/'

=begin
this script generates set of validator rules that is equivalent to following rule but unaffected by http://josm.openstreetmap.de/ticket/10913

*[construction=yes][highway =~ /motorway|trunk|primary|secondary|tertiary|unclassified|residential|service|living_street|pedestrian|cycleway|footway|steps|path|bridleway|track|bus_guideway|raceway|road/][highway!=construction] {
    throwWarning: tr("{0} with {1}=* (highway=construction, construction=* is a superior tagging scheme)", "{0.tag}", "{1.key}", "{1.value}");
fixRemove: "construction";
fixChangeKey: "highway => construction";
fixAdd: "highway=construction";
}
=end

highway_values = %w(motorway trunk primary secondary tertiary unclassified residential service living_street pedestrian cycleway footway steps path bridleway track bus_guideway raceway road)

highway_values.each {|value|
  puts "*[construction=yes][highway=#{value}] {"
  puts '    throwWarning: tr("{0} with {1}=* (highway=construction, construction=* is a superior tagging scheme)", "{0.tag}", "{1.key}", "{1.value}");'
  puts 'fixRemove: "construction";'
  puts 'fixRemove: "highway";'
  puts 'fixAdd: "construction=' + value + '";'
  puts 'fixAdd: "highway=construction";'
  puts '}'
  puts
}

*/
*[construction=yes][highway=motorway] {
    throwWarning: tr("{0} with {1}=* (highway=construction, construction=* is a superior tagging scheme)", "{0.tag}", "{1.key}", "{1.value}");
fixRemove: "construction";
fixRemove: "highway";
fixAdd: "construction=motorway";
fixAdd: "highway=construction";
}

*[construction=yes][highway=trunk] {
    throwWarning: tr("{0} with {1}=* (highway=construction, construction=* is a superior tagging scheme)", "{0.tag}", "{1.key}", "{1.value}");
fixRemove: "construction";
fixRemove: "highway";
fixAdd: "construction=trunk";
fixAdd: "highway=construction";
}

*[construction=yes][highway=primary] {
    throwWarning: tr("{0} with {1}=* (highway=construction, construction=* is a superior tagging scheme)", "{0.tag}", "{1.key}", "{1.value}");
fixRemove: "construction";
fixRemove: "highway";
fixAdd: "construction=primary";
fixAdd: "highway=construction";
}

*[construction=yes][highway=secondary] {
    throwWarning: tr("{0} with {1}=* (highway=construction, construction=* is a superior tagging scheme)", "{0.tag}", "{1.key}", "{1.value}");
fixRemove: "construction";
fixRemove: "highway";
fixAdd: "construction=secondary";
fixAdd: "highway=construction";
}

*[construction=yes][highway=tertiary] {
    throwWarning: tr("{0} with {1}=* (highway=construction, construction=* is a superior tagging scheme)", "{0.tag}", "{1.key}", "{1.value}");
fixRemove: "construction";
fixRemove: "highway";
fixAdd: "construction=tertiary";
fixAdd: "highway=construction";
}

*[construction=yes][highway=unclassified] {
    throwWarning: tr("{0} with {1}=* (highway=construction, construction=* is a superior tagging scheme)", "{0.tag}", "{1.key}", "{1.value}");
fixRemove: "construction";
fixRemove: "highway";
fixAdd: "construction=unclassified";
fixAdd: "highway=construction";
}

*[construction=yes][highway=residential] {
    throwWarning: tr("{0} with {1}=* (highway=construction, construction=* is a superior tagging scheme)", "{0.tag}", "{1.key}", "{1.value}");
fixRemove: "construction";
fixRemove: "highway";
fixAdd: "construction=residential";
fixAdd: "highway=construction";
}

*[construction=yes][highway=service] {
    throwWarning: tr("{0} with {1}=* (highway=construction, construction=* is a superior tagging scheme)", "{0.tag}", "{1.key}", "{1.value}");
fixRemove: "construction";
fixRemove: "highway";
fixAdd: "construction=service";
fixAdd: "highway=construction";
}

*[construction=yes][highway=living_street] {
    throwWarning: tr("{0} with {1}=* (highway=construction, construction=* is a superior tagging scheme)", "{0.tag}", "{1.key}", "{1.value}");
fixRemove: "construction";
fixRemove: "highway";
fixAdd: "construction=living_street";
fixAdd: "highway=construction";
}

*[construction=yes][highway=pedestrian] {
    throwWarning: tr("{0} with {1}=* (highway=construction, construction=* is a superior tagging scheme)", "{0.tag}", "{1.key}", "{1.value}");
fixRemove: "construction";
fixRemove: "highway";
fixAdd: "construction=pedestrian";
fixAdd: "highway=construction";
}

*[construction=yes][highway=cycleway] {
    throwWarning: tr("{0} with {1}=* (highway=construction, construction=* is a superior tagging scheme)", "{0.tag}", "{1.key}", "{1.value}");
fixRemove: "construction";
fixRemove: "highway";
fixAdd: "construction=cycleway";
fixAdd: "highway=construction";
}

*[construction=yes][highway=footway] {
    throwWarning: tr("{0} with {1}=* (highway=construction, construction=* is a superior tagging scheme)", "{0.tag}", "{1.key}", "{1.value}");
fixRemove: "construction";
fixRemove: "highway";
fixAdd: "construction=footway";
fixAdd: "highway=construction";
}

*[construction=yes][highway=steps] {
    throwWarning: tr("{0} with {1}=* (highway=construction, construction=* is a superior tagging scheme)", "{0.tag}", "{1.key}", "{1.value}");
fixRemove: "construction";
fixRemove: "highway";
fixAdd: "construction=steps";
fixAdd: "highway=construction";
}

*[construction=yes][highway=path] {
    throwWarning: tr("{0} with {1}=* (highway=construction, construction=* is a superior tagging scheme)", "{0.tag}", "{1.key}", "{1.value}");
fixRemove: "construction";
fixRemove: "highway";
fixAdd: "construction=path";
fixAdd: "highway=construction";
}

*[construction=yes][highway=bridleway] {
    throwWarning: tr("{0} with {1}=* (highway=construction, construction=* is a superior tagging scheme)", "{0.tag}", "{1.key}", "{1.value}");
fixRemove: "construction";
fixRemove: "highway";
fixAdd: "construction=bridleway";
fixAdd: "highway=construction";
}

*[construction=yes][highway=track] {
    throwWarning: tr("{0} with {1}=* (highway=construction, construction=* is a superior tagging scheme)", "{0.tag}", "{1.key}", "{1.value}");
fixRemove: "construction";
fixRemove: "highway";
fixAdd: "construction=track";
fixAdd: "highway=construction";
}

*[construction=yes][highway=bus_guideway] {
    throwWarning: tr("{0} with {1}=* (highway=construction, construction=* is a superior tagging scheme)", "{0.tag}", "{1.key}", "{1.value}");
fixRemove: "construction";
fixRemove: "highway";
fixAdd: "construction=bus_guideway";
fixAdd: "highway=construction";
}

*[construction=yes][highway=raceway] {
    throwWarning: tr("{0} with {1}=* (highway=construction, construction=* is a superior tagging scheme)", "{0.tag}", "{1.key}", "{1.value}");
fixRemove: "construction";
fixRemove: "highway";
fixAdd: "construction=raceway";
fixAdd: "highway=construction";
}

*[construction=yes][highway=road] {
    throwWarning: tr("{0} with {1}=* (highway=construction, construction=* is a superior tagging scheme)", "{0.tag}", "{1.key}", "{1.value}");
fixRemove: "construction";
fixRemove: "highway";
fixAdd: "construction=road";
fixAdd: "highway=construction";
}

Please provide any additional information below. Attach a screenshot if possible.

Revision: 8090
Repository Root: http://josm.openstreetmap.de/svn
Relative URL: ^/trunk
Last Changed Author: Don-vip
Last Changed Date: 2015-02-20 21:35:53 +0100 (Fri, 20 Feb 2015)
Build-Date: 2015-02-21 02:31:02
URL: http://josm.openstreetmap.de/svn/trunk
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last Changed Rev: 8090

Identification: JOSM/1.5 (8090 en) Linux Ubuntu 14.04.2 LTS
Memory Usage: 512 MB / 889 MB (219 MB allocated, but free)
Java version: 1.8.0_31, Oracle Corporation, Java HotSpot(TM) Server VM
Dataset consistency test: No problems found

Plugins:
- OpeningHoursEditor (30962)
- buildings_tools (30955)
- continuosDownload (1413902943)
- ext_tools (30892)
- measurement (30892)
- undelete (30892)

Last errors/warnings:
- W: TMS - Failed downloading http://ecn.t3.tiles.virtualearth.net/tiles/a12021021232231121211.jpeg?g=3293: Attribution is not loaded yet
- W: TMS - Failed downloading http://ecn.t0.tiles.virtualearth.net/tiles/a12021021232231121213.jpeg?g=3293: Attribution is not loaded yet
- W: TMS - Failed downloading http://ecn.t1.tiles.virtualearth.net/tiles/a12021021232231121031.jpeg?g=3293: Attribution is not loaded yet
- W: TMS - Failed downloading http://ecn.t2.tiles.virtualearth.net/tiles/a12021021232231121210.jpeg?g=3293: Attribution is not loaded yet
- E: Failed to locate image 'null'

Attachments (0)

Change History (3)

comment:1 by rickmastfan67, 9 years ago

The problem here is that 'construction=yes' and 'construction=minor' are tags used by people to indicate that the road is currently under-construction, but is still open to traffic.

This is quoted directly from the construction page on the wiki:

====
Additionally construction=minor can be used for existing highways which will be modified or repaired without being closed. In this case we don't set highway=construction but leave it at its default value.
====

Maybe suggest to people to convert 'construction=yes' to 'construction=minor' would be better in this case via the validator? Especially if the road is already open to the public, but is being repaired/repaved/rebuild while still being in use.

comment:2 by mkoniecz, 9 years ago

Using construction=yes as equivalent of construction=minor is not documented on this wikipage. construction=minor tag is described there as a separate tagging scheme ("Additionally construction=minor can be used for").

So using 'construction=yes' to indicate that "the road is currently under-construction, but is still open to traffic" is tagging error given that other meaning is documented (also, in my experience people are using construction=yes to describe construction resulting in lack of access).

Also Humanitarian style is considering "highway=*; construction=yes" and "highway=construction; construction=*" to be equivalent https://github.com/hotosm/HDM-CartoCSS/issues/234#issuecomment-57103077 (I am not aware about other data consumers supporting this tag).

comment:3 by mkoniecz, 5 years ago

Resolution: wontfix
Status: newclosed

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.