| 1 | /* {0} on a node, should be a way */
|
|---|
| 2 | node[oneway],
|
|---|
| 3 | node[bridge?],
|
|---|
| 4 | node[sidewalk],
|
|---|
| 5 | node[footway],
|
|---|
| 6 | node[aerialway=cable_car],
|
|---|
| 7 | node[aerialway=gondola],
|
|---|
| 8 | node[aerialway=chair_lift],
|
|---|
| 9 | node[aerialway=mixed_lift],
|
|---|
| 10 | node[aerialway=drag_lift],
|
|---|
| 11 | node[aerialway=t-bar],
|
|---|
| 12 | node[aerialway=j-bar],
|
|---|
| 13 | node[aerialway=platter],
|
|---|
| 14 | node[aerialway=magic_carpet],
|
|---|
| 15 | node[aerialway=rope_tow],
|
|---|
| 16 | node[aerialway=goods],
|
|---|
| 17 | node[waterway=river],
|
|---|
| 18 | node[waterway=riverbank],
|
|---|
| 19 | node[waterway=canal],
|
|---|
| 20 | node[waterway=wadi],
|
|---|
| 21 | node[waterway=stream],
|
|---|
| 22 | node[waterway=ditch],
|
|---|
| 23 | node[natural=coastline],
|
|---|
| 24 | node[natural=ridge],
|
|---|
| 25 | node[natural=tree_row] {
|
|---|
| 26 | throwWarning: tr("{0} on a node. Should be used on a way.", "{0.tag}");
|
|---|
| 27 | assertMatch: "node oneway=-1";
|
|---|
| 28 | assertNoMatch: "way oneway=-1";
|
|---|
| 29 | assertMatch: "node bridge=yes";
|
|---|
| 30 | assertNoMatch: "node bridge=13";
|
|---|
| 31 | }
|
|---|
| 32 |
|
|---|
| 33 | /* {0} on a node, should be an area; see ticket #10679 */
|
|---|
| 34 | node[landuse],
|
|---|
| 35 | node[natural=scree],
|
|---|
| 36 | node[natural=scrub],
|
|---|
| 37 | node[natural=fell],
|
|---|
| 38 | node[natural=heath],
|
|---|
| 39 | node[natural=wood],
|
|---|
| 40 | node[natural=grassland],
|
|---|
| 41 | node[natural=wetland],
|
|---|
| 42 | node[natural=water],
|
|---|
| 43 | node[natural=mud],
|
|---|
| 44 | node[natural=beach],
|
|---|
| 45 | node[natural=sand],
|
|---|
| 46 | node[natural=wood],
|
|---|
| 47 | node[natural=bare_rock],
|
|---|
| 48 | node[waterway=riverbank],
|
|---|
| 49 | node[source:outline] {
|
|---|
| 50 | throwWarning: tr("{0} on a node. Should be drawn as an area.", "{0.tag}");
|
|---|
| 51 | }
|
|---|
| 52 |
|
|---|
| 53 | /* {0} on a node, should be a relation; see #10252, #10769 */
|
|---|
| 54 | node[route],
|
|---|
| 55 | node[restriction] {
|
|---|
| 56 | throwWarning: tr("{0}=* on a node. Should be used in a relation", "{0.key}");
|
|---|
| 57 | }
|
|---|
| 58 |
|
|---|
| 59 | /* {0} on a way, should be a node */
|
|---|
| 60 | way[natural=peak],
|
|---|
| 61 | way[natural=saddle],
|
|---|
| 62 | way[natural=volcano],
|
|---|
| 63 | way[natural=tree] {
|
|---|
| 64 | throwWarning: tr("{0} on a way. Should be used on a node.", "{0.tag}");
|
|---|
| 65 | }
|
|---|
| 66 |
|
|---|
| 67 | /* {0} on a way, should be a relation; see #10252 */
|
|---|
| 68 | way[route=bus] {
|
|---|
| 69 | throwWarning: tr("{0} on a way. Should be used in a relation", "{0.tag}");
|
|---|
| 70 | }
|
|---|
| 71 |
|
|---|
| 72 | /* see ticket:#10125 */
|
|---|
| 73 | node[source:geometry] {
|
|---|
| 74 | throwWarning: tr("{0} on a node", "{0.key}");
|
|---|
| 75 | fixChangeKey: "source:geometry => source:position";
|
|---|
| 76 | }
|
|---|
| 77 |
|
|---|
| 78 | /* Building inside building (spatial test) */
|
|---|
| 79 | *[building][building!~/no|entrance/][any(tag("layer"),"0") = any(parent_tag("layer"),"0")] ∈
|
|---|
| 80 | *[building][building!~/no|entrance/] {
|
|---|
| 81 | throwWarning: tr("Building inside building");
|
|---|
| 82 | }
|
|---|
| 83 |
|
|---|
| 84 | /* Overlapping areas (spatial test) */
|
|---|
| 85 | area[natural =~ /^(water|wetland|coastline)$/], area[landuse=reservoir] {
|
|---|
| 86 | set water_area;
|
|---|
| 87 | }
|
|---|
| 88 |
|
|---|
| 89 | /* area:closed:areaStyle.water_area ⧉ area:closed:areaStyle.water_area -- does not work for now -- see ticket#10215 */
|
|---|
| 90 | area:closed:areaStyle[natural =~ /^(water|wetland|coastline)$/] ⧉ area:closed:areaStyle.water_area,
|
|---|
| 91 | area:closed:areaStyle[landuse=reservoir] ⧉ area:closed:areaStyle.water_area {
|
|---|
| 92 | throwWarning: tr("Overlapping Water Areas");
|
|---|
| 93 | }
|
|---|
| 94 |
|
|---|
| 95 | area:closed:areaStyle ⧉ area:closed:areaStyle {
|
|---|
| 96 | throwOther: tr("Overlapping Areas");
|
|---|
| 97 | }
|
|---|
| 98 |
|
|---|
| 99 | /* see ticket #9311 */
|
|---|
| 100 | node[amenity=parking]["capacity:disabled" !~ /^(yes|[0-9]+)$/] ∈ *[amenity=parking] {
|
|---|
| 101 | throwWarning: tr("{0} inside {1}", "amenity=parking", "amenity=parking");
|
|---|
| 102 | }
|
|---|
| 103 |
|
|---|
| 104 | /* see ticket #9556 */
|
|---|
| 105 | area:closed:areaStyle[tag("natural") = parent_tag("natural")] ⧉ area:closed:areaStyle[natural] {
|
|---|
| 106 | throwWarning: tr("Overlapping Identical Natural Areas");
|
|---|
| 107 | }
|
|---|
| 108 |
|
|---|
| 109 | area:closed:areaStyle[tag("landuse") = parent_tag("landuse")] ⧉ area:closed:areaStyle[landuse] {
|
|---|
| 110 | throwWarning: tr("Overlapping Identical Landuses");
|
|---|
| 111 | }
|
|---|
| 112 |
|
|---|
| 113 | /* see ticket:#9522 */
|
|---|
| 114 | node[tag("amenity") = parent_tag("amenity")] ∈ *[amenity][amenity != parking] {
|
|---|
| 115 | throwWarning: tr("{0} inside {1}", concat("amenity=", tag("amenity")), concat("amenity=", tag("amenity")));
|
|---|
| 116 | }
|
|---|
| 117 | node[tag("leisure") = parent_tag("leisure")] ∈ *[leisure] {
|
|---|
| 118 | throwWarning: tr("{0} inside {1}", concat("leisure=", tag("leisure")), concat("leisure=", tag("leisure")));
|
|---|
| 119 | }
|
|---|
| 120 | node[tag("tourism") = parent_tag("tourism")] ∈ *[tourism] {
|
|---|
| 121 | throwWarning: tr("{0} inside {1}", concat("tourism=", tag("tourism")), concat("tourism=", tag("tourism")));
|
|---|
| 122 | }
|
|---|
| 123 | node[tag("shop") = parent_tag("shop")] ∈ *[shop] {
|
|---|
| 124 | throwWarning: tr("{0} inside {1}", concat("shop=", tag("shop")), concat("shop=", tag("shop")));
|
|---|
| 125 | }
|
|---|
| 126 | node[tag("power") = parent_tag("power")] ∈ *[power] {
|
|---|
| 127 | throwWarning: tr("{0} inside {1}", concat("power=", tag("power")), concat("power=", tag("power")));
|
|---|
| 128 | }
|
|---|
| 129 |
|
|---|
| 130 | /* isolated nodes which should be part of a way, see #10825 */
|
|---|
| 131 | node:unconnected[entrance],
|
|---|
| 132 | node:unconnected[traffic_calming],
|
|---|
| 133 | node:unconnected[highway=passing_place],
|
|---|
| 134 | node:unconnected[highway=mini_roundabout],
|
|---|
| 135 | node:unconnected[highway=motorway_junction],
|
|---|
| 136 | node:unconnected[highway=turning_loop],
|
|---|
| 137 | node:unconnected[highway=turning_circle],
|
|---|
| 138 | node:unconnected[highway=stop],
|
|---|
| 139 | node:unconnected[highway=give_way],
|
|---|
| 140 | node:unconnected[highway=traffic_signals],
|
|---|
| 141 | node:unconnected[highway=crossing],
|
|---|
| 142 | node:unconnected[crossing],
|
|---|
| 143 | node:unconnected[railway=crossing],
|
|---|
| 144 | node:unconnected[railway=level_crossing],
|
|---|
| 145 | node:unconnected[railway=buffer_stop],
|
|---|
| 146 | node:unconnected[public_transport=stop_position],
|
|---|
| 147 | node:unconnected[noexit],
|
|---|
| 148 | node:unconnected[waterway=dam],
|
|---|
| 149 | node:unconnected[waterway=weir],
|
|---|
| 150 | node:unconnected[waterway=waterfall],
|
|---|
| 151 | node:unconnected[amenity=ferry_terminal],
|
|---|
| 152 | node:unconnected[mountain_pass=yes],
|
|---|
| 153 | node:unconnected[barrier=gate],
|
|---|
| 154 | node:unconnected[barrier=lift_gate],
|
|---|
| 155 | node:unconnected[barrier=swing_gate],
|
|---|
| 156 | node:unconnected[barrier=toll_booth],
|
|---|
| 157 | node:unconnected[barrier=turnstile],
|
|---|
| 158 | node:unconnected[barrier=full-height_turnstile],
|
|---|
| 159 | node:unconnected[barrier=motorcycle_barrier],
|
|---|
| 160 | node:unconnected[barrier=rope],
|
|---|
| 161 | node:unconnected[barrier=sally_port],
|
|---|
| 162 | node:unconnected[barrier=spikes],
|
|---|
| 163 | node:unconnected[barrier=stile],
|
|---|
| 164 | node:unconnected[barrier=sump_buster],
|
|---|
| 165 | node:unconnected[barrier=kerb],
|
|---|
| 166 | node:unconnected[barrier=border_control],
|
|---|
| 167 | node:unconnected[barrier=bump_gate],
|
|---|
| 168 | node:unconnected[barrier=bus_trap],
|
|---|
| 169 | node:unconnected[barrier=cattle_grid],
|
|---|
| 170 | node:unconnected[barrier=chain],
|
|---|
| 171 | node:unconnected[barrier=cycle_barrier],
|
|---|
| 172 | node:unconnected[barrier=hampshire_gate],
|
|---|
| 173 | node:unconnected[barrier=height_restrictor],
|
|---|
| 174 | node:unconnected[barrier=debris] {
|
|---|
| 175 | throwWarning: tr("{0} must be connected to a way", "{1.tag}");
|
|---|
| 176 | }
|
|---|