Ticket #10932: josm_10932.patch

File josm_10932.patch, 4.9 KB (added by skyper, 4 years ago)

patch

  • resources/data/validator/combinations.mapcss

     
    7272*[source:addr:postcode         ][!addr:postcode],
    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";
    7778  assertNoMatch: "way lanes=42 highway=unclassified";
     
    578579  group: tr("missing tag");
    579580}
    580581
    581 /* see #8519, #11529, limited to motorways and trunks to avoid false positives for streets with lanes for non motorized traffic */
    582 way[highway =~ /^(motorway|motorway_link|trunk|trunk_link)$/][lanes][turn:lanes              ][tag(lanes)!=eval(count(split("|", tag("turn:lanes"))))],
    583 way[highway =~ /^(motorway|motorway_link|trunk|trunk_link)$/][lanes][change:lanes            ][tag(lanes)!=eval(count(split("|", tag("change:lanes"))))],
    584 way[highway =~ /^(motorway|motorway_link|trunk|trunk_link)$/][lanes][maxspeed:lanes          ][tag(lanes)!=eval(count(split("|", tag("maxspeed:lanes"))))],
    585 way[highway =~ /^(motorway|motorway_link|trunk|trunk_link)$/][lanes][minspeed:lanes          ][tag(lanes)!=eval(count(split("|", tag("minspeed:lanes"))))],
    586 way[highway =~ /^(motorway|motorway_link|trunk|trunk_link)$/][lanes][destination:lanes       ][tag(lanes)!=eval(count(split("|", tag("destination:lanes"))))],
    587 way[highway =~ /^(motorway|motorway_link|trunk|trunk_link)$/][lanes][destination:ref:lanes   ][tag(lanes)!=eval(count(split("|", tag("destination:ref:lanes"))))],
    588 way[highway =~ /^(motorway|motorway_link|trunk|trunk_link)$/][lanes][destination:symbol:lanes][tag(lanes)!=eval(count(split("|", tag("destination:symbol:lanes"))))] {
    589     throwWarning: tr("Different number of lanes in the keys {0} and {1}", "{1.key}", "{2.key}");
    590     group: tr("suspicious tag combination");
    591 }
    592 
    593582/* #13680 */
    594583area[golf=bunker][natural=beach] {
    595584  throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
     
    608597  group: tr("missing tag");
    609598}
    610599
     600/* see #8519, #11529, limited to motorways and trunks to avoid false positives for streets with lanes for non motorized traffic */
     601way[highway =~ /^(motorway|motorway_link|trunk|trunk_link)$/][lanes][turn:lanes              ][tag(lanes)!=eval(count(split("|", tag("turn:lanes"))))],
     602way[highway =~ /^(motorway|motorway_link|trunk|trunk_link)$/][lanes][change:lanes            ][tag(lanes)!=eval(count(split("|", tag("change:lanes"))))],
     603way[highway =~ /^(motorway|motorway_link|trunk|trunk_link)$/][lanes][maxspeed:lanes          ][tag(lanes)!=eval(count(split("|", tag("maxspeed:lanes"))))],
     604way[highway =~ /^(motorway|motorway_link|trunk|trunk_link)$/][lanes][minspeed:lanes          ][tag(lanes)!=eval(count(split("|", tag("minspeed:lanes"))))],
     605way[highway =~ /^(motorway|motorway_link|trunk|trunk_link)$/][lanes][destination:lanes       ][tag(lanes)!=eval(count(split("|", tag("destination:lanes"))))],
     606way[highway =~ /^(motorway|motorway_link|trunk|trunk_link)$/][lanes][destination:ref:lanes   ][tag(lanes)!=eval(count(split("|", tag("destination:ref:lanes"))))],
     607way[highway =~ /^(motorway|motorway_link|trunk|trunk_link)$/][lanes][destination:symbol:lanes][tag(lanes)!=eval(count(split("|", tag("destination:symbol:lanes"))))] {
     608    throwWarning: tr("Different number of lanes in the keys {0} and {1}", "{1.key}", "{2.key}");
     609    group: tr("suspicious tag combination");
     610}
     611
    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] {
    613614  throwWarning: tr("street with odd number of {0}, but without {1} and {2} or {3}", "{1.key}", "{2.key}", "{3.key}", "{4.key}");
     
    619620  assertMatch: "way highway=primary lanes=3";
    620621}
    621622
     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("Highway with `*:{0}` in a key but without `{0}` ", "{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";
     634}
     635
    622636/* #15774 */
    623637node[emergency=fire_hydrant][fire_hydrant:count][fire_hydrant:count!=1] {
    624638  throwOther: tr("{0} together with {1}. Tag each hydrant separately.", "{0.tag}", "{1.tag}");
     
    747761  assertNoMatch: "node man_made=communications_tower height=\"328.22 ft\"";
    748762  assertNoMatch: "node man_made=communications_tower height=4358'8\"";
    749763  assertNoMatch: "node height=4358'";
    750 }
    751  No newline at end of file
     764}