Changeset 16769 in josm


Ignore:
Timestamp:
2020-07-14T21:10:20+02:00 (3 weeks ago)
Author:
Klumbumbus
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/resources/data/validator/combinations.mapcss

    r16713 r16769  
    7373*[source:addr:housenumber      ][!addr:housenumber] {
    7474  throwWarning: tr("{0} without {1}", "{0.key}", "{1.key}");
     75  set MissingKeyWarning;
    7576  group: tr("missing tag");
    7677  assertMatch: "way lanes=42";
     
    579580}
    580581
     582/* #13680 */
     583area[golf=bunker][natural=beach] {
     584  throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
     585  suggestAlternative: "natural=sand";
     586  suggestAlternative: "surface=sand";
     587  group: tr("suspicious tag combination");
     588}
     589
     590/* #13705 */
     591relation[type=multipolygon][building] > way {
     592  set part_of_building_MP;
     593}
     594way["addr:housenumber"][!building][!"building:part"][!"demolished:building"][!note][!amenity][!leisure][!landuse][!man_made][!tourism][!barrier]!.part_of_building_MP {
     595  /* don't exclude shop because a lot of real missing bulding tag cases have a shop tag. */
     596  throwOther: tr("possibly missing {0} tag", "{1.key}");
     597  group: tr("missing tag");
     598}
     599
    581600/* see #8519, #11529, limited to motorways and trunks to avoid false positives for streets with lanes for non motorized traffic */
    582601way[highway =~ /^(motorway|motorway_link|trunk|trunk_link)$/][lanes][turn:lanes              ][tag(lanes)!=eval(count(split("|", tag("turn:lanes"))))],
     
    591610}
    592611
    593 /* #13680 */
    594 area[golf=bunker][natural=beach] {
    595   throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
    596   suggestAlternative: "natural=sand";
    597   suggestAlternative: "surface=sand";
    598   group: tr("suspicious tag combination");
    599 }
    600 
    601 /* #13705 */
    602 relation[type=multipolygon][building] > way {
    603   set part_of_building_MP;
    604 }
    605 way["addr:housenumber"][!building][!"building:part"][!"demolished:building"][!note][!amenity][!leisure][!landuse][!man_made][!tourism][!barrier]!.part_of_building_MP {
    606   /* don't exclude shop because a lot of real missing bulding tag cases have a shop tag. */
    607   throwOther: tr("possibly missing {0} tag", "{1.key}");
    608   group: tr("missing tag");
    609 }
    610 
    611612/* #14125, #14323, #18185 */
    612613way[highway][lanes][!lanes:forward][!lanes:backward][oneway!=yes][oneway!=-1][oneway!=reversible][junction!=roundabout][lanes>2][get(split(".", tag(lanes)/2), 1)=5] {
     
    618619  assertNoMatch: "way highway=primary lanes=4";
    619620  assertMatch: "way highway=primary lanes=3";
     621}
     622
     623/* #10932 */
     624way[highway][!lanes][/^.*:lanes$/]!.MissingKeyWarning,
     625way[highway][!lanes:forward][/^.*:lanes:forward$/],
     626way[highway][!lanes:backward][/^.*:lanes:backward$/],
     627way[highway][!lanes:both_ways][/^.*:lanes:both_ways$/] {
     628  throwWarning: tr("{0} without {1}", "{2.key}", "{1.key}");
     629  group: tr("missing tag");
     630  assertMatch: "way highway=primary turn:lanes=left|right";
     631  assertNoMatch: "way highway=primary turn:lanes=left|right lanes=2";
     632  assertMatch: "way highway=primary turn:lanes:forward=left|right";
     633  assertNoMatch: "way highway=primary turn:lanes:forward=left|right lanes:forward=2";
    620634}
    621635
Note: See TracChangeset for help on using the changeset viewer.