[7281] | 1 | way[highway=~/^(motorway|trunk|primary|secondary|tertiary)$/] {
|
---|
[6601] | 2 | set major_road;
|
---|
| 3 | }
|
---|
[7281] | 4 | way[highway=~/^.*_link$/] {
|
---|
| 5 | set link_road;
|
---|
| 6 | }
|
---|
[6601] | 7 | way[highway=~/^(unclassified|residential|living_street|service)$/] {
|
---|
| 8 | set minor_road;
|
---|
| 9 | }
|
---|
| 10 |
|
---|
[6874] | 11 | way[highway][name =~ /(?i).* (Ave|Blvd|Br|Brg|Cct|Cir|Cl|Cr|Crct|Cres|Crt|Ct|Dr|Drv|Esp|Espl|Hwy|Ln|Mw|Mwy|Pky|Pkwy|Pl|Rd|Qy|Qys|Sq|St|Str|Ter|Tce|Tr|Wy)[.]?$/] {
|
---|
[6513] | 12 | throwWarning: tr("abbreviated street name");
|
---|
| 13 | assertMatch: "way highway=unclassified name=\"Foo Ave\"";
|
---|
| 14 | assertMatch: "way highway=unclassified name=\"Foo Ave.\"";
|
---|
| 15 | assertMatch: "way highway=unclassified name=\"Bou Blvd.\"";
|
---|
| 16 | assertMatch: "way highway=unclassified name=\"Bou blvd.\"";
|
---|
| 17 | }
|
---|
| 18 |
|
---|
[11050] | 19 | node[highway =~ /motorway|trunk|primary|secondary|tertiary|unclassified|residential|service|living_street|pedestrian|track|path|footway|cycleway|bus_guideway|bridleway/][highway!=motorway_junction][highway!=services] {
|
---|
[6513] | 20 | throwWarning: tr("wrong highway tag on a node");
|
---|
| 21 | assertMatch: "node highway=primary";
|
---|
| 22 | assertMatch: "node highway=primary_link";
|
---|
[6516] | 23 | assertNoMatch: "node highway=traffic_calming";
|
---|
| 24 | assertNoMatch: "node highway=bus_stop";
|
---|
[6513] | 25 | assertNoMatch: "node highway=crossing";
|
---|
[6516] | 26 | assertNoMatch: "node highway=emergency_access_point";
|
---|
| 27 | assertNoMatch: "node highway=give_way";
|
---|
| 28 | assertNoMatch: "node highway=mini_roundabout";
|
---|
| 29 | assertNoMatch: "node highway=motorway_junction";
|
---|
| 30 | assertNoMatch: "node highway=passing_place";
|
---|
| 31 | assertNoMatch: "node highway=rest_area";
|
---|
| 32 | assertNoMatch: "node highway=speed_camera";
|
---|
| 33 | assertNoMatch: "node highway=street_lamp";
|
---|
| 34 | assertNoMatch: "node highway=services";
|
---|
| 35 | assertNoMatch: "node highway=stop";
|
---|
| 36 | assertNoMatch: "node highway=traffic_signals";
|
---|
| 37 | assertNoMatch: "node highway=turning_circle";
|
---|
[6513] | 38 | }
|
---|
| 39 |
|
---|
[7977] | 40 | way[highway=crossing],
|
---|
| 41 | way[railway=crossing],
|
---|
| 42 | way[railway=level_crossing] {
|
---|
[6513] | 43 | throwWarning: tr("wrong crossing tag on a way");
|
---|
| 44 | assertMatch: "way highway=crossing";
|
---|
| 45 | assertNoMatch: "node highway=crossing";
|
---|
| 46 | }
|
---|
| 47 |
|
---|
[7932] | 48 | way[highway=unclassified][!name][noname!=yes] {
|
---|
[6513] | 49 | throwOther: tr("Unnamed unclassified highway");
|
---|
| 50 | assertMatch: "way highway=unclassified";
|
---|
[7932] | 51 | assertNoMatch: "way highway=unclassified noname=yes";
|
---|
[6513] | 52 | assertNoMatch: "way highway=unclassified name=Foo";
|
---|
| 53 | }
|
---|
| 54 |
|
---|
[11337] | 55 | way.major_road[!ref][!destination:ref] {
|
---|
[6513] | 56 | throwOther: tr("highway without a reference");
|
---|
[11146] | 57 | group: tr("missing tag");
|
---|
[6513] | 58 | assertMatch: "way highway=primary";
|
---|
| 59 | assertNoMatch: "way highway=primary ref=123";
|
---|
[11337] | 60 | assertNoMatch: "way highway=primary destination:ref=123";
|
---|
[6513] | 61 | }
|
---|
| 62 |
|
---|
| 63 | way[highway=road] {
|
---|
| 64 | throwWarning: tr("temporary highway type");
|
---|
| 65 | assertMatch: "way highway=road";
|
---|
| 66 | assertNoMatch: "way highway=residential";
|
---|
| 67 | }
|
---|
| 68 |
|
---|
[6550] | 69 | way[highway=footway][maxspeed],
|
---|
| 70 | way[highway=steps][maxspeed],
|
---|
[7819] | 71 | way[highway=cycleway][bicycle=no],
|
---|
| 72 | way[highway=footway][foot=no],
|
---|
[6550] | 73 | way[highway=cycleway][cycleway=lane] {
|
---|
| 74 | throwWarning: tr("{0} used with {1}", "{0.value}", "{1.tag}");
|
---|
[6513] | 75 | assertNoMatch: "way highway=cycleway bicycle=yes";
|
---|
| 76 | assertNoMatch: "way highway=cycleway";
|
---|
| 77 | assertNoMatch: "way highway=footway foot=yes";
|
---|
| 78 | assertNoMatch: "way highway=footway";
|
---|
| 79 | assertMatch: "way highway=cycleway cycleway=lane";
|
---|
| 80 | assertNoMatch: "way highway=cycleway";
|
---|
| 81 | assertNoMatch: "way highway=residential cycleway=lane";
|
---|
| 82 | assertMatch: "way highway=footway maxspeed=20";
|
---|
| 83 | assertNoMatch: "way highway=residential maxspeed=20";
|
---|
| 84 | assertNoMatch: "way highway=footway";
|
---|
| 85 | }
|
---|
| 86 |
|
---|
[11364] | 87 | /* footway, see #10851, #10976 */
|
---|
| 88 | way[footway=left][/footway:/],
|
---|
| 89 | way[footway=right][/footway:/],
|
---|
| 90 | way[footway=both][/footway:/],
|
---|
| 91 | way[footway=no][/footway:/] {
|
---|
| 92 | throwWarning: tr("{0} is deprecated, use {1} instead. Also check similar tags like {2}", "{0.tag}", "sidewalk", "{1.key}");
|
---|
| 93 | group: tr("deprecated tagging");
|
---|
| 94 | set not_fixable_footway;
|
---|
| 95 | assertMatch: "way footway=both footway:surface=asphalt";
|
---|
| 96 | }
|
---|
| 97 | way[footway=none][/footway:/] {
|
---|
| 98 | throwWarning: tr("{0} is deprecated, use {1} instead. Also check similar tags like {2}", "{0.tag}", "sidewalk=no", "{1.key}");
|
---|
| 99 | group: tr("deprecated tagging");
|
---|
| 100 | set not_fixable_footway;
|
---|
| 101 | }
|
---|
| 102 | way[footway=left]!.not_fixable_footway,
|
---|
| 103 | way[footway=right]!.not_fixable_footway,
|
---|
| 104 | way[footway=both]!.not_fixable_footway,
|
---|
| 105 | way[footway=no]!.not_fixable_footway {
|
---|
[7814] | 106 | throwWarning: tr("{0} is deprecated", "{0.tag}");
|
---|
| 107 | suggestAlternative: "sidewalk";
|
---|
[11139] | 108 | group: tr("deprecated tagging");
|
---|
[7814] | 109 | fixChangeKey: "footway => sidewalk";
|
---|
[11364] | 110 | set fixable_footway;
|
---|
[7814] | 111 | }
|
---|
[11364] | 112 | way[footway=none]!.not_fixable_footway {
|
---|
[7814] | 113 | throwWarning: tr("{0} is deprecated", "{0.tag}");
|
---|
| 114 | suggestAlternative: "sidewalk=no";
|
---|
[11139] | 115 | group: tr("deprecated tagging");
|
---|
[7814] | 116 | fixRemove: "footway";
|
---|
| 117 | fixAdd: "sidewalk=no";
|
---|
[11364] | 118 | set fixable_footway;
|
---|
[7814] | 119 | }
|
---|
[11364] | 120 | way[footway][footway!=sidewalk][footway!=crossing]!.fixable_footway!.not_fixable_footway { /* do not trigger this rule if already one of the 4 previous rules applied */
|
---|
[7814] | 121 | throwWarning: tr("Value of ''{0}'' should either be ''{1}'' or ''{2}''. For sidewalks use ''{3}'' instead.", "{0.key}", "{1.value}", "{2.value}", "sidewalk=left|right|both|no");
|
---|
[11049] | 122 | assertNoMatch: "way footway=left";
|
---|
| 123 | assertNoMatch: "way footway=none";
|
---|
[11364] | 124 | assertNoMatch: "way footway=left footway:left:surface=asphalt";
|
---|
[11049] | 125 | assertMatch: "way footway=bar";
|
---|
[9839] | 126 | }
|
---|
| 127 |
|
---|
| 128 | /* #11270 */
|
---|
| 129 | way[railway =~ /^(light_rail|miniature|narrow_gauge|preserved|rail)$/] > node { set .is_in_railway }
|
---|
| 130 | way[highway =~ /^(bridleway|cycleway|footway|path|steps)$/] > node[railway != crossing].is_in_railway {
|
---|
| 131 | throwWarning: tr("pedestrian railway crossing without {0}", "{0.tag}");
|
---|
[11146] | 132 | group: tr("missing tag");
|
---|
[9839] | 133 | fixAdd: "railway=crossing";
|
---|
| 134 | }
|
---|
| 135 | way[highway =~ /^(bus_guideway|living_street|motorway|pedestrian|primary|raceway|residential|road|secondary|service|tertiary|track|trunk|unclassified)/] > node[railway != level_crossing].is_in_railway {
|
---|
| 136 | throwWarning: tr("railway crossing without {0}", "{0.tag}");
|
---|
[11146] | 137 | group: tr("missing tag");
|
---|
[9839] | 138 | fixAdd: "railway=level_crossing";
|
---|
[7814] | 139 | }
|
---|