Ticket #19609: josm_19609_wip.patch
| File josm_19609_wip.patch, 4.8 KB (added by , 6 years ago) |
|---|
-
resources/data/validator/combinations.mapcss
72 72 *[source:addr:postcode ][!addr:postcode], 73 73 *[source:addr:housenumber ][!addr:housenumber] { 74 74 throwWarning: tr("{0} without {1}", "{0.key}", "{1.key}"); 75 set MissingKeyWarning;76 75 group: tr("missing tag"); 77 76 assertMatch: "way lanes=42"; 78 77 assertNoMatch: "way lanes=42 highway=unclassified"; … … 605 604 } 606 605 607 606 /* 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"))))] { 607 way[highway =~ /^(motorway|motorway_link|trunk|trunk_link)$/] { 608 set MotorwayTrunk; 609 } 610 way.MotorwayTrunk[lanes][turn:lanes ][tag(lanes)!=eval(count(split("|", tag("turn:lanes"))))], 611 way.MotorwayTrunk[lanes][change:lanes ][tag(lanes)!=eval(count(split("|", tag("change:lanes"))))], 612 way.MotorwayTrunk[lanes][maxspeed:lanes ][tag(lanes)!=eval(count(split("|", tag("maxspeed:lanes"))))], 613 way.MotorwayTrunk[lanes][minspeed:lanes ][tag(lanes)!=eval(count(split("|", tag("minspeed:lanes"))))], 614 way.MotorwayTrunk[lanes][destination:lanes ][tag(lanes)!=eval(count(split("|", tag("destination:lanes"))))], 615 way.MotorwayTrunk[lanes][destination:ref:lanes ][tag(lanes)!=eval(count(split("|", tag("destination:ref:lanes"))))], 616 way.MotorwayTrunk[lanes][destination:symbol:lanes][tag(lanes)!=eval(count(split("|", tag("destination:symbol:lanes"))))] { 615 617 throwWarning: tr("Different number of lanes in the keys {0} and {1}", "{1.key}", "{2.key}"); 616 618 group: tr("suspicious tag combination"); 617 619 } 618 620 619 621 /* #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] {622 way[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] { 621 623 throwWarning: tr("street with odd number of {0}, but without {1} and {2} or {3}", "{1.key}", "{2.key}", "{3.key}", "{4.key}"); 622 624 group: tr("missing tag"); 623 625 assertNoMatch: "way highway=primary lanes=2"; … … 627 629 assertMatch: "way highway=primary lanes=3"; 628 630 } 629 631 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 */ 633 way[highway][!lanes][/^.*:lanes$/][!source:lanes], 634 way[highway][!lanes][/^.*:lanes:(forward|backward|both_ways)$/], 634 635 way[highway][!lanes:both_ways][/^.*:lanes:both_ways$/] { 635 throwWarning: tr(" {0} without {1}", "{2.key}", "{1.key}");636 throwWarning: tr("`{0}` without `{1}`., "{2.key}=*", "{1.key}=*"); 636 637 group: tr("missing tag"); 637 638 assertMatch: "way highway=primary turn:lanes=left|right"; 638 assertNoMatch: "way highway=primary turn:lanes=left|right lanes=2";639 639 assertMatch: "way highway=primary turn:lanes:forward=left|right"; 640 assertNoMatch: "way highway=primary turn:lanes=left|right lanes=2"; 641 } 642 way[highway][!lanes:forward][/^.*:lanes:forward$/][!lanes:backward][!get(split(".", tag(lanes)/2), 1)=5], 643 way[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"; 640 647 assertNoMatch: "way highway=primary turn:lanes:forward=left|right lanes:forward=2"; 648 assertNoMatch: "way highway=primary turn:lanes:forward=left|right lanes=3"; 641 649 } 642 650 643 651 /* #15774 */
