Changeset 16860 in josm for trunk/resources/data


Ignore:
Timestamp:
2020-08-10T18:03:19+02:00 (4 years ago)
Author:
Klumbumbus
Message:

fix #19609 - Adjust lanes warnings (patch by skyper)

Location:
trunk/resources/data/validator
Files:
2 edited

Legend:

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

    r16859 r16860  
    7373*[source:addr:housenumber      ][!addr:housenumber] {
    7474  throwWarning: tr("{0} without {1}", "{0.key}", "{1.key}");
    75   set MissingKeyWarning;
    7675  group: tr("missing tag");
    7776  assertMatch: "way lanes=42";
     
    606605
    607606/* see #8519, #11529, limited to motorways and trunks to avoid false positives for streets with lanes for non motorized traffic */
    608 way[highway =~ /^(motorway|motorway_link|trunk|trunk_link)$/][lanes][turn:lanes              ][tag(lanes)!=eval(count(split("|", tag("turn:lanes"))))],
    609 way[highway =~ /^(motorway|motorway_link|trunk|trunk_link)$/][lanes][change:lanes            ][tag(lanes)!=eval(count(split("|", tag("change:lanes"))))],
    610 way[highway =~ /^(motorway|motorway_link|trunk|trunk_link)$/][lanes][maxspeed:lanes          ][tag(lanes)!=eval(count(split("|", tag("maxspeed:lanes"))))],
    611 way[highway =~ /^(motorway|motorway_link|trunk|trunk_link)$/][lanes][minspeed:lanes          ][tag(lanes)!=eval(count(split("|", tag("minspeed:lanes"))))],
    612 way[highway =~ /^(motorway|motorway_link|trunk|trunk_link)$/][lanes][destination:lanes       ][tag(lanes)!=eval(count(split("|", tag("destination:lanes"))))],
    613 way[highway =~ /^(motorway|motorway_link|trunk|trunk_link)$/][lanes][destination:ref:lanes   ][tag(lanes)!=eval(count(split("|", tag("destination:ref:lanes"))))],
    614 way[highway =~ /^(motorway|motorway_link|trunk|trunk_link)$/][lanes][destination:symbol:lanes][tag(lanes)!=eval(count(split("|", tag("destination:symbol:lanes"))))] {
     607way[highway =~ /^(motorway|motorway_link|trunk|trunk_link)$/] {
     608  set MotorwayTrunk;
     609}
     610way.MotorwayTrunk[lanes][turn:lanes              ][tag(lanes)!=eval(count(split("|", tag("turn:lanes"))))],
     611way.MotorwayTrunk[lanes][change:lanes            ][tag(lanes)!=eval(count(split("|", tag("change:lanes"))))],
     612way.MotorwayTrunk[lanes][maxspeed:lanes          ][tag(lanes)!=eval(count(split("|", tag("maxspeed:lanes"))))],
     613way.MotorwayTrunk[lanes][minspeed:lanes          ][tag(lanes)!=eval(count(split("|", tag("minspeed:lanes"))))],
     614way.MotorwayTrunk[lanes][destination:lanes       ][tag(lanes)!=eval(count(split("|", tag("destination:lanes"))))],
     615way.MotorwayTrunk[lanes][destination:ref:lanes   ][tag(lanes)!=eval(count(split("|", tag("destination:ref:lanes"))))],
     616way.MotorwayTrunk[lanes][destination:symbol:lanes][tag(lanes)!=eval(count(split("|", tag("destination:symbol:lanes"))))] {
    615617    throwWarning: tr("Different number of lanes in the keys {0} and {1}", "{1.key}", "{2.key}");
    616618    group: tr("suspicious tag combination");
     
    618620
    619621/* #14125, #14323, #18185 */
    620 way[highway][lanes][!lanes:forward][!lanes:backward][oneway!=yes][oneway!=-1][oneway!=reversible][junction!=roundabout][lanes>2][get(split(".", tag(lanes)/2), 1)=5] {
     622way[highway][lanes][!lanes:forward][!lanes:backward][oneway!=yes][oneway!=-1][oneway!=reversible][highway!=motorway][junction!=roundabout][lanes>2][get(split(".", tag(lanes)/2), 1)=5] {
    621623  throwWarning: tr("street with odd number of {0}, but without {1} and {2} or {3}", "{1.key}", "{2.key}", "{3.key}", "{4.key}");
    622624  group: tr("missing tag");
     
    628630}
    629631
    630 /* #10932 */
    631 way[highway][!lanes][/^.*:lanes$/]!.MissingKeyWarning,
    632 way[highway][!lanes:forward][/^.*:lanes:forward$/],
    633 way[highway][!lanes:backward][/^.*:lanes:backward$/],
     632/* #10932, #19609 */
     633way[highway][!lanes][/^.*:lanes$/][!source:lanes],
     634way[highway][!lanes][/^.*:lanes:(forward|backward|both_ways)$/],
    634635way[highway][!lanes:both_ways][/^.*:lanes:both_ways$/] {
    635636  throwWarning: tr("{0} without {1}", "{2.key}", "{1.key}");
    636637  group: tr("missing tag");
    637638  assertMatch: "way highway=primary turn:lanes=left|right";
     639  assertMatch: "way highway=primary turn:lanes:forward=left|right";
    638640  assertNoMatch: "way highway=primary turn:lanes=left|right lanes=2";
    639   assertMatch: "way highway=primary turn:lanes:forward=left|right";
     641}
     642way[highway][!lanes:forward][/^.*:lanes:forward$/][!lanes:backward][!get(split(".", tag(lanes)/2), 1)=5],
     643way[highway][!lanes:backward][/^.*:lanes:backward$/][!lanes:forward][!get(split(".", tag(lanes)/2), 1)=5] {
     644  throwOther: tr("{0} without {1}", "{2.key}", "{1.key}");
     645  group: tr("missing tag");
     646  assertMatch: "way highway=primary turn:lanes:forward=left|right lanes=2";
    640647  assertNoMatch: "way highway=primary turn:lanes:forward=left|right lanes:forward=2";
     648  assertNoMatch: "way highway=primary turn:lanes:forward=left|right lanes=3";
    641649}
    642650
  • trunk/resources/data/validator/unnecessary.mapcss

    r16858 r16860  
    153153  assertNoMatch: "way name=kiosk amenity=grave_yard";
    154154}
    155   /* the following without fixRemove to avoid informatin loss, should be checked manually */
     155  /* the following without fixRemove to avoid information loss, should be checked manually */
    156156*[name][name=~/^(?i)(chapel|chapelle|kapelle)$/], /* check if amenity=place_of_worship and/or building=chapel applies */
    157157*[name][name=~/^(?i)(silo)$/][man_made!=silo], /* check if man_made=silo and/or building=silo applies */
Note: See TracChangeset for help on using the changeset viewer.