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 | | |
| 600 | /* see #8519, #11529, limited to motorways and trunks to avoid false positives for streets with lanes for non motorized traffic */ |
| 601 | way[highway =~ /^(motorway|motorway_link|trunk|trunk_link)$/][lanes][turn:lanes ][tag(lanes)!=eval(count(split("|", tag("turn:lanes"))))], |
| 602 | way[highway =~ /^(motorway|motorway_link|trunk|trunk_link)$/][lanes][change:lanes ][tag(lanes)!=eval(count(split("|", tag("change:lanes"))))], |
| 603 | way[highway =~ /^(motorway|motorway_link|trunk|trunk_link)$/][lanes][maxspeed:lanes ][tag(lanes)!=eval(count(split("|", tag("maxspeed:lanes"))))], |
| 604 | way[highway =~ /^(motorway|motorway_link|trunk|trunk_link)$/][lanes][minspeed:lanes ][tag(lanes)!=eval(count(split("|", tag("minspeed:lanes"))))], |
| 605 | way[highway =~ /^(motorway|motorway_link|trunk|trunk_link)$/][lanes][destination:lanes ][tag(lanes)!=eval(count(split("|", tag("destination:lanes"))))], |
| 606 | way[highway =~ /^(motorway|motorway_link|trunk|trunk_link)$/][lanes][destination:ref:lanes ][tag(lanes)!=eval(count(split("|", tag("destination:ref:lanes"))))], |
| 607 | way[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 | |
| 623 | /* #10932 */ |
| 624 | way[highway][!lanes][/^.*:lanes$/]!.MissingKeyWarning, |
| 625 | way[highway][!lanes:forward][/^.*:lanes:forward$/], |
| 626 | way[highway][!lanes:backward][/^.*:lanes:backward$/], |
| 627 | way[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 | |