| [6548] | 1 | /* Rules partially derived from Taginfo statistics - see ticket #5017
|
|---|
| 2 | * Taginfo query: select keypairs.key1, keypairs.key2, keypairs.count_all, keys.count_all, cast(keypairs.count_all as real)/keys.count_all as from_fraction_all from keys, keypairs where key1='waterway' and keys.key=keypairs.key2 and (key1<>'highway' or keypairs.count_all>12000) and (key1<>'railway' or keypairs.count_all>3000) and (key1<>'waterway' or keypairs.count_all>800) and key2 not like '%:%' and from_fraction_all>0.97 and 1 union select keypairs.key2, keypairs.key1, keypairs.count_all, keys.count_all, cast(keypairs.count_all as real)/keys.count_all as from_fraction_all from keys, keypairs where key2='waterway' and keys.key=keypairs.key1 and (key2<>'highway' or keypairs.count_all>12000) and (key2<>'railway' or keypairs.count_all>3000) and (key2<>'waterway' or keypairs.count_all>800) and key1 not like '%:%' and from_fraction_all>0.97 and 1 order by keypairs.count_all desc limit 1000;
|
|---|
| 3 | */
|
|---|
| 4 |
|
|---|
| [7229] | 5 | /* {0.key} without {1.key} (warning level) */
|
|---|
| [7906] | 6 | way[junction ][!highway][junction!=yes],
|
|---|
| [11407] | 7 | way[lanes ][!highway][leisure!=track][leisure!=swimming_pool],
|
|---|
| [11305] | 8 | way[living_street ][!highway],
|
|---|
| 9 | way[maintenance ][!highway],
|
|---|
| 10 | way[median ][!highway],
|
|---|
| 11 | way[motorroad ][!highway],
|
|---|
| 12 | node[ntd_id ][!highway],
|
|---|
| 13 | way[sac_scale ][!highway],
|
|---|
| 14 | way[sidewalk ][!highway],
|
|---|
| 15 | way[step_count ][!highway],
|
|---|
| 16 | way[tracktype ][!highway],
|
|---|
| 17 | way[trail_visibility ][!highway],
|
|---|
| 18 | way[trolley_wire ][!highway],
|
|---|
| 19 | way[zip_left ][!highway],
|
|---|
| 20 | way[zip_right ][!highway],
|
|---|
| 21 | way[detail ][!railway][route!=railway],
|
|---|
| 22 | way[eddy_current_brake ][!railway][route!=railway],
|
|---|
| 23 | way[electrified ][!railway][route!=railway],
|
|---|
| 24 | way[etcs ][!railway][route!=railway],
|
|---|
| 25 | way[gauge ][!railway][route!=railway],
|
|---|
| 26 | way[grade_of_track ][!railway][route!=railway],
|
|---|
| 27 | way[kursbuchstrecke ][!railway][route!=railway],
|
|---|
| 28 | way[lzb ][!railway][route!=railway],
|
|---|
| 29 | way[old_railway_operator ][!railway][route!=railway],
|
|---|
| 30 | way[operating_procedure ][!railway][route!=railway],
|
|---|
| 31 | way[pzb ][!railway][route!=railway],
|
|---|
| 32 | way[structure_gauge ][!railway][route!=railway],
|
|---|
| 33 | way[tilting_technology ][!railway][route!=railway],
|
|---|
| 34 | way[track_class ][!railway][route!=railway],
|
|---|
| 35 | way[tracks ][!railway][route!=railway],
|
|---|
| 36 | way[traffic_mode ][!railway][route!=railway],
|
|---|
| 37 | way[usage ][!railway][route!=railway][man_made!=pipeline],
|
|---|
| 38 | way[workrules ][!railway][route!=railway],
|
|---|
| 39 | way[stream ][!waterway],
|
|---|
| 40 | way[length_unit ][!waterway],
|
|---|
| 41 | way[canal ][!waterway],
|
|---|
| 42 | way[have_riverbank ][!waterway],
|
|---|
| [6548] | 43 | *[border_type ][!boundary],
|
|---|
| [11305] | 44 | way[bridge:structure ][!bridge],
|
|---|
| [8121] | 45 | *[piste:difficulty ][!piste:type],
|
|---|
| [6548] | 46 | *[source:date ][!source],
|
|---|
| 47 | *[source:name ][!name],
|
|---|
| 48 | *[source:maxspeed:forward ][!maxspeed:forward],
|
|---|
| 49 | *[source:maxspeed:backward ][!maxspeed:backward],
|
|---|
| 50 | *[source:maxspeed:forward ][!source:maxspeed:backward],
|
|---|
| 51 | *[source:maxspeed:backward ][!source:maxspeed:forward],
|
|---|
| 52 | *[source:building ][!building],
|
|---|
| 53 | *[source:ref ][!ref],
|
|---|
| 54 | *[source:population ][!population],
|
|---|
| 55 | *[source:postal_code ][!postal_code],
|
|---|
| 56 | *[source:ele ][!ele],
|
|---|
| 57 | *[source:ref:INSEE ][!ref:INSEE],
|
|---|
| 58 | *[source:lit ][!lit],
|
|---|
| 59 | *[source:hgv ][!hgv],
|
|---|
| 60 | *[source:highway ][!highway],
|
|---|
| 61 | *[source:maxaxleload ][!maxaxleload],
|
|---|
| 62 | *[source:surface ][!surface],
|
|---|
| 63 | *[source:bridge ][!bridge],
|
|---|
| 64 | *[source:old_name ][!old_name],
|
|---|
| 65 | *[source:bicycle ][!bicycle],
|
|---|
| 66 | *[source:designation ][!designation],
|
|---|
| 67 | *[source:height ][!height],
|
|---|
| 68 | *[source:lanes ][!lanes],
|
|---|
| [6645] | 69 | *[source:postcode ][!addr:postcode],
|
|---|
| 70 | *[source:housenumber ][!addr:housenumber],
|
|---|
| 71 | *[source:addr:postcode ][!addr:postcode],
|
|---|
| 72 | *[source:addr:housenumber ][!addr:housenumber],
|
|---|
| [6548] | 73 | *[source:addr ][!/^addr:/],
|
|---|
| 74 | *[source:maxspeed ][!/^maxspeed:?/] {
|
|---|
| 75 | throwWarning: tr("{0} without {1}", "{0.key}", "{1.key}");
|
|---|
| [11146] | 76 | group: tr("missing tag");
|
|---|
| [6548] | 77 | assertMatch: "way lanes=42";
|
|---|
| 78 | assertNoMatch: "way lanes=42 highway=unclassified";
|
|---|
| 79 | assertMatch: "node source:addr:postcode=postman";
|
|---|
| 80 | assertMatch: "node source:addr=postman";
|
|---|
| 81 | assertNoMatch: "node source:addr=postman addr:housenumber=42";
|
|---|
| 82 | }
|
|---|
| 83 |
|
|---|
| [7229] | 84 | /* {0.key} without {1.key} (info level) */
|
|---|
| [11305] | 85 | way[lanes:forward][!lanes:backward][oneway!=yes][oneway!=-1],
|
|---|
| 86 | way[lanes:backward][!lanes:forward][oneway!=yes][oneway!=-1],
|
|---|
| [7229] | 87 | *[leaf_type ][!leaf_cycle],
|
|---|
| 88 | *[leaf_cycle][!leaf_type] {
|
|---|
| 89 | throwOther: tr("{0} without {1}", "{0.key}", "{1.key}");
|
|---|
| [11146] | 90 | group: tr("missing tag");
|
|---|
| [7229] | 91 | }
|
|---|
| 92 |
|
|---|
| [6548] | 93 | /* {0.key} without {1.tag} */
|
|---|
| [12997] | 94 | *[switch ][!power],
|
|---|
| [9500] | 95 | *[transformer ][!power],
|
|---|
| [11305] | 96 | way[fence_type ][barrier!=fence],
|
|---|
| [6548] | 97 | *[recycling_type ][amenity!=recycling],
|
|---|
| [7996] | 98 | *[information ][tourism!=information],
|
|---|
| [11305] | 99 | node[board_type ][information!=board],
|
|---|
| [6548] | 100 | *[shelter_type ][amenity!=shelter],
|
|---|
| [11305] | 101 | node[lamp_type ][highway!=street_lamp],
|
|---|
| 102 | node[map_type ][information!=map],
|
|---|
| [6548] | 103 | *[site_type ][historic!=archaeological_site],
|
|---|
| 104 | *[artwork_type ][tourism!=artwork],
|
|---|
| 105 | *[castle_type ][historic!=castle],
|
|---|
| [8147] | 106 | *[parking ][amenity!~/^(parking|parking_space|parking_entrance|motorcycle_parking)$/],
|
|---|
| [11305] | 107 | way[cutline ][man_made!=cutline],
|
|---|
| [6548] | 108 | *[bunker_type ][military!=bunker] {
|
|---|
| 109 | throwWarning: tr("{0} without {1}", "{0.key}", "{1.tag}");
|
|---|
| [11146] | 110 | group: tr("missing tag");
|
|---|
| [6548] | 111 | }
|
|---|
| 112 |
|
|---|
| [9903] | 113 | /* {0.key} without {1.tag} or {2.tag} */
|
|---|
| [12677] | 114 | *[bridge:movable ][bridge!=movable][man_made!=bridge],
|
|---|
| [9903] | 115 | *[substation ][power!=substation][pipeline!=substation],
|
|---|
| 116 | *[reservoir_type ][landuse!=reservoir][water!=reservoir] {
|
|---|
| 117 | throwWarning: tr("{0} without {1} or {2}", "{0.key}", "{1.tag}", "{2.tag}");
|
|---|
| [11146] | 118 | group: tr("missing tag");
|
|---|
| [9903] | 119 | }
|
|---|
| 120 |
|
|---|
| [8080] | 121 | /* {0.tag} without {1.key} (warning level) */
|
|---|
| [10320] | 122 | relation[route=bicycle][!network][type=route],
|
|---|
| 123 | relation[route=hiking][!network][type=route],
|
|---|
| 124 | relation[route=foot][!network][type=route],
|
|---|
| 125 | relation[route=horse][!network][type=route],
|
|---|
| 126 | relation[route=piste][!piste:type][type=route],
|
|---|
| 127 | relation[route=ski][!piste:type][type=route],
|
|---|
| [7996] | 128 | *[tourism=information][!information],
|
|---|
| [11153] | 129 | *[leisure=pitch][!sport],
|
|---|
| [7929] | 130 | *[aeroway=terminal][!building],
|
|---|
| [7967] | 131 | *[power=generator][!generator:source],
|
|---|
| [11398] | 132 | *[amenity=social_facility][!social_facility],
|
|---|
| [7929] | 133 | *[amenity=place_of_worship][!religion] {
|
|---|
| [7923] | 134 | throwWarning: tr("{0} without {1}", "{0.tag}", "{1.key}");
|
|---|
| [11146] | 135 | group: tr("missing tag");
|
|---|
| [7923] | 136 | }
|
|---|
| 137 |
|
|---|
| [8080] | 138 | /* {0.tag} without {1.key} (info level) */
|
|---|
| [11428] | 139 | way[highway=track ][!tracktype],
|
|---|
| [9495] | 140 | way[power=cable ][!location],
|
|---|
| [9500] | 141 | node[power=transformer ][!voltage],
|
|---|
| 142 | way[power=line ][!voltage],
|
|---|
| 143 | way[power=minor_line ][!voltage],
|
|---|
| 144 | way[power=cable ][!voltage],
|
|---|
| 145 | *[power=generator ][!voltage][generator:output:electricity],
|
|---|
| 146 | *[power=plant ][!voltage][plant:output:electricity],
|
|---|
| 147 | *[power=substation ][!substation],
|
|---|
| [12997] | 148 | *[power=switch ][!switch],
|
|---|
| [9500] | 149 | *[power=transformer ][!transformer],
|
|---|
| [8080] | 150 | *[amenity=parking ][!parking],
|
|---|
| 151 | *[amenity=parking_entrance ][!parking] {
|
|---|
| 152 | throwOther: tr("{0} without {1}", "{0.tag}", "{1.key}");
|
|---|
| [11146] | 153 | group: tr("missing tag");
|
|---|
| [9500] | 154 | assertMatch: "way power=line";
|
|---|
| 155 | assertNoMatch: "way power=line voltage=1";
|
|---|
| [12997] | 156 | assertMatch: "way power=switch";
|
|---|
| [9500] | 157 | assertMatch: "way power=substation";
|
|---|
| 158 | assertMatch: "way power=substation transformer=foobar";
|
|---|
| 159 | assertNoMatch: "way power=substation substation=foobar";
|
|---|
| 160 | assertMatch: "way power=generator generator:output:electricity=yes";
|
|---|
| 161 | assertNoMatch: "way power=generator";
|
|---|
| 162 | assertNoMatch: "way power=generator generator:output:electricity=yes voltage=1";
|
|---|
| [8080] | 163 | }
|
|---|
| 164 |
|
|---|
| [6548] | 165 | /* {0.key} without {1.key} or {2.tag} */
|
|---|
| [10068] | 166 | *[smoothness ][!highway][amenity!~/^(parking|parking_space|parking_entrance|motorcycle_parking|bicycle_parking)$/],
|
|---|
| [9003] | 167 | *[segregated ][!highway][railway!=crossing] {
|
|---|
| [6548] | 168 | throwWarning: tr("{0} without {1} or {2}", "{0.key}", "{1.key}", "{2.tag}");
|
|---|
| [11146] | 169 | group: tr("missing tag");
|
|---|
| [6548] | 170 | }
|
|---|
| 171 |
|
|---|
| [8746] | 172 | /* {0.tag} without {1.tag} (info level) see #11600 #11393 #11850 */
|
|---|
| [11305] | 173 | way[highway=motorway][!oneway][junction!=roundabout],
|
|---|
| 174 | way[highway=motorway_link][!oneway][junction!=roundabout] {
|
|---|
| [8591] | 175 | throwOther: tr("{0} without {1}", "{0.tag}", "{1.tag}");
|
|---|
| [11146] | 176 | group: tr("missing tag");
|
|---|
| [8545] | 177 | }
|
|---|
| 178 |
|
|---|
| [8411] | 179 | /* {0.tag} without {1.tag} or {2.tag} */
|
|---|
| 180 | *[amenity=recycling][recycling_type!=container][recycling_type!=centre] {
|
|---|
| 181 | throwWarning: tr("{0} without {1} or {2}", "{0.tag}", "{1.tag}", "{2.tag}");
|
|---|
| [11146] | 182 | group: tr("missing tag");
|
|---|
| [8411] | 183 | }
|
|---|
| 184 |
|
|---|
| [8057] | 185 | /* {0.key} without {1.key}, {2.tag} or {3.tag} */
|
|---|
| [9003] | 186 | *[intermittent ][!waterway][natural!~/^(water|spring)$/][ford!=yes],
|
|---|
| 187 | *[boat ][!waterway][natural!=water][landuse!=basin] {
|
|---|
| [8057] | 188 | throwWarning: tr("{0} without {1}, {2} or {3}", "{0.key}", "{1.key}", "{2.tag}", "{3.tag}");
|
|---|
| [11146] | 189 | group: tr("missing tag");
|
|---|
| [7767] | 190 | }
|
|---|
| 191 |
|
|---|
| [6880] | 192 | /* {0.key} without {1.key}, {2.key} or {3.key} */
|
|---|
| [11513] | 193 | way[oneway][!highway][!railway][!aerialway],
|
|---|
| [6880] | 194 | *[snowplowing ][!highway][!amenity][!leisure] {
|
|---|
| 195 | throwWarning: tr("{0} without {1}, {2} or {3}", "{0.key}", "{1.key}", "{2.key}", "{3.key}");
|
|---|
| [11146] | 196 | group: tr("missing tag");
|
|---|
| [6880] | 197 | }
|
|---|
| 198 |
|
|---|
| [7250] | 199 | /* {0.key} without {1.key}, {2.key} or {3.tag} */
|
|---|
| [11305] | 200 | way[incline ][!highway][!railway][aeroway!~/^(runway|taxiway)$/],
|
|---|
| [7250] | 201 | *[toll ][!highway][!barrier][route!~/^(ferry|road)$/] {
|
|---|
| 202 | throwWarning: tr("{0} without {1}, {2} or {3}", "{0.key}", "{1.key}", "{2.key}", "{3.tag}");
|
|---|
| [11146] | 203 | group: tr("missing tag");
|
|---|
| [7250] | 204 | }
|
|---|
| 205 |
|
|---|
| [11346] | 206 | /* {0.tag} together with {1.key}, see #10837, #14034 */
|
|---|
| 207 | *[amenity=vending_machine][shop],
|
|---|
| [8043] | 208 | *[noname?][name] {
|
|---|
| [8437] | 209 | throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.key}");
|
|---|
| [11146] | 210 | group: tr("suspicious tag combination");
|
|---|
| [7818] | 211 | }
|
|---|
| 212 |
|
|---|
| [10535] | 213 | /* {0.tag} together with {1.key}, see #9389, #11977, #13156 */
|
|---|
| 214 | way[oneway=yes][/:backward/][!traffic_sign:backward][bicycle:backward!=use_sidepath],
|
|---|
| 215 | way[oneway=yes][/:forward/][!traffic_sign:forward][bicycle:forward!=use_sidepath],
|
|---|
| 216 | way[oneway=-1 ][/:backward/][!traffic_sign:backward][bicycle:backward!=use_sidepath],
|
|---|
| 217 | way[oneway=-1 ][/:forward/][!traffic_sign:forward][bicycle:forward!=use_sidepath] {
|
|---|
| [8077] | 218 | throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.key}");
|
|---|
| [11146] | 219 | group: tr("suspicious tag combination");
|
|---|
| [8077] | 220 | }
|
|---|
| 221 |
|
|---|
| [8044] | 222 | /* {0.tag} together with {1.tag} (info level), see #9696 */
|
|---|
| [11305] | 223 | way[highway=footway][oneway=no] {
|
|---|
| [8044] | 224 | throwOther: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
|
|---|
| [11146] | 225 | group: tr("suspicious tag combination");
|
|---|
| [8044] | 226 | }
|
|---|
| 227 |
|
|---|
| [8117] | 228 | /* {0.tag} together with {1.tag}, see #10186 */
|
|---|
| [11305] | 229 | way[highway=footway][bicycle=designated] {
|
|---|
| [8117] | 230 | throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
|
|---|
| [11146] | 231 | group: tr("suspicious tag combination");
|
|---|
| [8117] | 232 | }
|
|---|
| 233 |
|
|---|
| [11074] | 234 | /* #11127, #13727 */
|
|---|
| 235 | way[waterway][bridge=yes][waterway!=weir] {
|
|---|
| [8089] | 236 | throwWarning: tr("{0} together with {1}", "{0.key}", "{1.tag}");
|
|---|
| 237 | suggestAlternative: "bridge=aqueduct";
|
|---|
| [11146] | 238 | group: tr("suspicious tag combination");
|
|---|
| [8089] | 239 | fixAdd: "bridge=aqueduct";
|
|---|
| 240 | }
|
|---|
| [11074] | 241 | way[waterway=weir][bridge=yes][highway] {
|
|---|
| 242 | throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
|
|---|
| 243 | suggestAlternative: "waterway=weir + ford=yes";
|
|---|
| 244 | suggestAlternative: "waterway=dam";
|
|---|
| 245 | suggestAlternative: tr("two objects, one with {0} and one with {1} + {2} + {3}", "{0.tag}", "{2.key}", "{1.tag}", "layer");
|
|---|
| [11146] | 246 | group: tr("suspicious tag combination");
|
|---|
| [11074] | 247 | }
|
|---|
| [8089] | 248 |
|
|---|
| [12416] | 249 | /* only {0.key}, see #11104 #12422 #14950 */
|
|---|
| 250 | *[access][eval(number_of_tags()) = 1],
|
|---|
| [8054] | 251 | *[area][eval(number_of_tags()) = 1],
|
|---|
| 252 | *[name][eval(number_of_tags()) = 1],
|
|---|
| [9837] | 253 | *[ref][eval(number_of_tags()) = 1],
|
|---|
| 254 | *[lit][eval(number_of_tags()) = 1] {
|
|---|
| [8054] | 255 | throwWarning: tr("incomplete object: only {0}", "{0.key}");
|
|---|
| [11146] | 256 | group: tr("missing tag");
|
|---|
| [8054] | 257 | }
|
|---|
| 258 | /* only {0.key} and {1.key}, see #11104 */
|
|---|
| 259 | *[name][area][eval(number_of_tags()) = 2],
|
|---|
| 260 | *[name][ref][eval(number_of_tags()) = 2] {
|
|---|
| 261 | throwWarning: tr("incomplete object: only {0} and {1}", "{0.key}", "{1.key}");
|
|---|
| [11146] | 262 | group: tr("missing tag");
|
|---|
| [8054] | 263 | }
|
|---|
| 264 |
|
|---|
| [11548] | 265 | /* #9811, #11491, #12865, #14310 */
|
|---|
| 266 | *[place][place!=farm][/^(addr:housenumber|addr:housename|addr:flats|addr:conscriptionnumber|addr:street|addr:place|addr:city|addr:country|addr:full|addr:hamlet|addr:suburb|addr:subdistrict|addr:district|addr:province|addr:state|addr:interpolation|addr:interpolation|addr:inclusion)$/],
|
|---|
| 267 | /* addr:postcode is used together with place in some countries */
|
|---|
| [8043] | 268 | *[boundary][/^addr:/],
|
|---|
| [8730] | 269 | *[highway][/^addr:/][highway!=services][highway!=rest_area][!"addr:postcode"] {
|
|---|
| [8043] | 270 | throwWarning: tr("{0} together with addr:*", "{0.key}");
|
|---|
| [11146] | 271 | group: tr("suspicious tag combination");
|
|---|
| [11548] | 272 | assertMatch: "node place=foo addr:housenumber=5";
|
|---|
| 273 | assertMatch: "node place=foo addr:housenumber=5 addr:postcode=12345";
|
|---|
| 274 | assertNoMatch: "node place=foo addr:postcode=12345";
|
|---|
| [8043] | 275 | }
|
|---|
| [8730] | 276 | *[!highway][postal_code]["addr:postcode"][postal_code=*"addr:postcode"] {
|
|---|
| 277 | throwWarning: tr("{0} together with {1}", "{1.key}", "{2.key}");
|
|---|
| [11146] | 278 | group: tr("suspicious tag combination");
|
|---|
| [8730] | 279 | }
|
|---|
| 280 | *[!highway][postal_code]["addr:postcode"][postal_code!=*"addr:postcode"] {
|
|---|
| 281 | throwWarning: tr("{0} together with {1} and conflicting values", "{1.key}", "{2.key}");
|
|---|
| [11146] | 282 | group: tr("suspicious tag combination");
|
|---|
| [8730] | 283 | }
|
|---|
| 284 | way[highway][postal_code]["addr:postcode"][postal_code=*"addr:postcode"] {
|
|---|
| 285 | throwWarning: tr("{0} together with {1}", "{1.key}", "{2.key}");
|
|---|
| [11146] | 286 | group: tr("suspicious tag combination");
|
|---|
| [8730] | 287 | fixRemove: "addr:postcode";
|
|---|
| 288 | }
|
|---|
| 289 | way[highway][postal_code]["addr:postcode"][postal_code!=*"addr:postcode"] {
|
|---|
| 290 | throwWarning: tr("{0} together with {1} and conflicting values", "{1.key}", "{2.key}");
|
|---|
| [11146] | 291 | group: tr("suspicious tag combination");
|
|---|
| [8730] | 292 | }
|
|---|
| [10272] | 293 | way[highway][highway!=services][highway!=rest_area][!postal_code]["addr:postcode"] {
|
|---|
| [11052] | 294 | throwWarning: tr("{0} together with {1}", "{0.key}", "{4.key}");
|
|---|
| [8730] | 295 | suggestAlternative: "postal_code";
|
|---|
| [11146] | 296 | group: tr("suspicious tag combination");
|
|---|
| [8730] | 297 | fixChangeKey: "addr:postcode=>postal_code";
|
|---|
| 298 | }
|
|---|
| [8043] | 299 |
|
|---|
| [10350] | 300 | /* #9195 */
|
|---|
| [11305] | 301 | way[highway=footway][cycleway=lane] {
|
|---|
| [8042] | 302 | throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
|
|---|
| [8046] | 303 | suggestAlternative: "highway=path + foot=designated + bicycle=designated + segregated=yes";
|
|---|
| [11146] | 304 | group: tr("suspicious tag combination");
|
|---|
| [8042] | 305 | }
|
|---|
| 306 |
|
|---|
| [6548] | 307 | /* {0} on suspicious object */
|
|---|
| [12704] | 308 | *[tunnel ][!highway][!railway][!waterway][!piste:type][public_transport!=platform][route!=ferry][man_made!=pipeline][man_made!=goods_conveyor],
|
|---|
| 309 | *[bridge ][!highway][!railway][!waterway][!piste:type][public_transport!=platform][route!=ferry][man_made!=pipeline][man_made!=goods_conveyor][man_made!=bridge][building!=bridge],
|
|---|
| [6548] | 310 | *[psv ][!highway][!railway][!waterway][amenity !~ /^parking.*/],
|
|---|
| [11430] | 311 | *[width ][!highway][!railway][!waterway][!aeroway][!cycleway][!footway][!barrier][!man_made][!entrance][natural!=stone],
|
|---|
| [12473] | 312 | *[maxspeed][!highway][!railway][traffic_sign !~ /^((.*;)?maxspeed(;.*)?|[A-Z][A-Z]:.+)$/][type != enforcement][waterway !~ /^(river|canal|lock)$/][!traffic_calming][aerialway!=zip_line] {
|
|---|
| [6548] | 313 | throwWarning: tr("{0} on suspicious object", "{0.key}");
|
|---|
| [11146] | 314 | group: tr("suspicious tag combination");
|
|---|
| [6548] | 315 | }
|
|---|
| 316 |
|
|---|
| [11146] | 317 | node[amenity][amenity =~ /^(restaurant|cafe|fast_food)$/][!name][noname!=yes] {
|
|---|
| 318 | throwOther: tr("{0} without {1}", "{0.tag}", "{2.key}");
|
|---|
| 319 | group: tr("missing tag");
|
|---|
| [6548] | 320 | assertMatch: "node amenity=restaurant";
|
|---|
| [7932] | 321 | assertNoMatch: "node amenity=restaurant noname=yes";
|
|---|
| [6548] | 322 | assertNoMatch: "node amenity=restaurant name=Foobar";
|
|---|
| 323 | }
|
|---|
| 324 |
|
|---|
| [6550] | 325 | way[highway][barrier],
|
|---|
| [8559] | 326 | *[highway][waterway][waterway!=dam][waterway!=weir],
|
|---|
| [11429] | 327 | way[highway][natural][natural!=ridge],
|
|---|
| [6548] | 328 | *[landuse][building] {
|
|---|
| [11146] | 329 | throwWarning: tr("{0} together with {1}", "{0.key}", "{1.key}");
|
|---|
| 330 | group: tr("suspicious tag combination");
|
|---|
| [7265] | 331 | assertNoMatch: "node highway=street_lamp natural=birds_nest note=josm#10193";
|
|---|
| [6548] | 332 | }
|
|---|
| 333 |
|
|---|
| [10350] | 334 | /* #6932 */
|
|---|
| [10798] | 335 | *[natural=water][leisure=swimming_pool] {
|
|---|
| [6548] | 336 | throwWarning: tr("natural water used for swimming pool");
|
|---|
| [11146] | 337 | group: tr("suspicious tag combination");
|
|---|
| [7274] | 338 | fixRemove: "natural";
|
|---|
| [6548] | 339 | }
|
|---|
| [6860] | 340 |
|
|---|
| [10350] | 341 | /* #9593, #11183, #12418, #12761 */
|
|---|
| [11732] | 342 | *[sport][sport!=skiing][!building][!club][tourism != hotel][highway != raceway][leisure !~ /^(sports_centre|stadium|track|pitch|golf_course|water_park|swimming_pool|recreation_ground|ice_rink|horse_riding|fitness_centre|fitness_station|bowling_alley)$/][natural !~ /^(beach|bare_rock|cliff|peak|water)$/][amenity !~ /^(pub|restaurant|swimming_pool)$/][landuse !~ /^(recreation_ground|piste|farm|farmland)$/][barrier !~ /^(wall|retaining_wall)$/][!"piste:type"][shop!=sports] {
|
|---|
| [6860] | 343 | throwWarning: tr("sport without physical feature");
|
|---|
| [11146] | 344 | group: tr("missing tag");
|
|---|
| [6860] | 345 | assertMatch: "node sport=tennis";
|
|---|
| 346 | assertNoMatch: "node sport=tennis leisure=pitch";
|
|---|
| 347 | assertNoMatch: "node sport=beachvolleyball natural=beach";
|
|---|
| [11159] | 348 | assertNoMatch: "node sport=skiing"; /* skiing has deprecated warning */
|
|---|
| [6860] | 349 | assertNoMatch: "node sport=swimming tourism=hotel";
|
|---|
| 350 | assertNoMatch: "node sport=10pin amenity=restaurant";
|
|---|
| [7243] | 351 | }
|
|---|
| 352 |
|
|---|
| [10350] | 353 | /* #10140 */
|
|---|
| [7243] | 354 | *[building:levels][!building][!building:part] {
|
|---|
| 355 | throwWarning: tr("{0} without {1} or {2}", "{0.key}", "{1.key}", "{2.key}");
|
|---|
| [11146] | 356 | group: tr("missing tag");
|
|---|
| [7243] | 357 | }
|
|---|
| [7488] | 358 |
|
|---|
| [8480] | 359 | /* any other *_name tag (with some exceptions) but not a name , see #10837 #11297 #11539 */
|
|---|
| 360 | *[/_name$/][!name][!old_name][!loc_name][!uic_name][!artist_name][!"osak:municipality_name"][!"osak:street_name"][noname!=yes] {
|
|---|
| [7818] | 361 | throwWarning: tr("alternative name without {0}", "{1.key}");
|
|---|
| [11146] | 362 | group: tr("missing tag");
|
|---|
| [7818] | 363 | }
|
|---|
| 364 |
|
|---|
| [10350] | 365 | /* #10837 */
|
|---|
| [9386] | 366 | way[destination][!oneway?][junction!=roundabout][highway] {
|
|---|
| [7818] | 367 | throwWarning: tr("incomplete usage of {0} on a way without {1}", "{0.key}", "{1.key}");
|
|---|
| 368 | suggestAlternative: "destination:forward";
|
|---|
| 369 | suggestAlternative: "destination:backward";
|
|---|
| [8700] | 370 | }
|
|---|
| 371 |
|
|---|
| [10350] | 372 | /* #11389 */
|
|---|
| [8700] | 373 | way["maxspeed:forward"=*"maxspeed:backward"][!maxspeed] {
|
|---|
| 374 | throwWarning: tr("Same value of {0} and {1}", "{0.key}", "{1.key}");
|
|---|
| 375 | suggestAlternative: "maxspeed";
|
|---|
| [11146] | 376 | group: tr("suspicious tag combination");
|
|---|
| [8700] | 377 | fixChangeKey: "maxspeed:forward=>maxspeed";
|
|---|
| 378 | fixRemove: "maxspeed:backward";
|
|---|
| 379 | }
|
|---|
| 380 | way["maxspeed:forward"=*maxspeed]["maxspeed:backward"=*maxspeed][maxspeed] {
|
|---|
| 381 | throwWarning: tr("Same value of {0}, {1} and {2}", "{0.key}", "{1.key}", "{2.key}");
|
|---|
| 382 | set AllSameMaxspeed;
|
|---|
| 383 | suggestAlternative: "maxspeed";
|
|---|
| [11146] | 384 | group: tr("suspicious tag combination");
|
|---|
| [8700] | 385 | fixRemove: "maxspeed:forward";
|
|---|
| 386 | fixRemove: "maxspeed:backward";
|
|---|
| 387 | }
|
|---|
| 388 | way["maxspeed:forward"]["maxspeed:backward"][maxspeed]!.AllSameMaxspeed {
|
|---|
| 389 | throwWarning: tr("{0} and {1} together with {2} and conflicting values", "{0.key}", "{1.key}", "{2.key}");
|
|---|
| [11146] | 390 | group: tr("suspicious tag combination");
|
|---|
| [8700] | 391 | }
|
|---|
| 392 | way["maxspeed:forward"][maxspeed][!"maxspeed:backward"],
|
|---|
| 393 | way["maxspeed:backward"][maxspeed][!"maxspeed:forward"] {
|
|---|
| 394 | throwWarning: tr("{0} together with {1}", "{0.key}", "{1.key}");
|
|---|
| [11146] | 395 | group: tr("suspicious tag combination");
|
|---|
| [8754] | 396 | }
|
|---|
| 397 |
|
|---|
| [10350] | 398 | /* #11837 */
|
|---|
| [8754] | 399 | way[layer][layer<0][bridge][bridge!=no][location!=underground][indoor!=yes][!tunnel],
|
|---|
| 400 | way[layer][layer>0][tunnel][tunnel!=no][location!=overground][indoor!=yes][!bridge] {
|
|---|
| [11146] | 401 | throwWarning: tr("{0} together with {1}", "{2.tag}", "{0.tag}");
|
|---|
| 402 | group: tr("suspicious tag combination");
|
|---|
| [10350] | 403 | }
|
|---|
| 404 |
|
|---|
| 405 | /* #12942 */
|
|---|
| 406 | relation[oneway][type!=route] {
|
|---|
| 407 | throwWarning: tr("{0} on a relation without {1}", "{0.key}", "{1.tag}");
|
|---|
| [10388] | 408 | }
|
|---|
| 409 |
|
|---|
| 410 | /* #9182 */
|
|---|
| [10419] | 411 | way[waterway][layer][layer=~/^(-1|-2|-3|-4|-5)$/][!tunnel][culvert!=yes][covered!=yes][pipeline!=yes][location!=underground][eval(waylength()) > 400] {
|
|---|
| 412 | throwWarning: tr("Long waterway with {0} but without a tag which defines it as tunnel or underground. Remove {1} or add a tunnel tag if applicable. Also check crossing bridges and their {1} tags.", "{1.tag}", "{1.key}");
|
|---|
| [11146] | 413 | group: tr("suspicious tag combination");
|
|---|
| [10388] | 414 | }
|
|---|
| [10419] | 415 | way[waterway][layer][layer=~/^(-1|-2|-3|-4|-5)$/][!tunnel][culvert!=yes][covered!=yes][pipeline!=yes][location!=underground][eval(waylength()) <= 400] {
|
|---|
| 416 | throwOther: tr("Short waterway with {0} but without a tag which defines it as tunnel or underground. Remove {1} or add a tunnel tag if applicable. Also check crossing bridges and their {1} tags.", "{1.tag}", "{1.key}");
|
|---|
| [11146] | 417 | group: tr("suspicious tag combination");
|
|---|
| [10537] | 418 | }
|
|---|
| 419 |
|
|---|
| 420 | /* #13144 */
|
|---|
| 421 | *[unisex=yes][female=yes][male!=yes],
|
|---|
| 422 | *[unisex=yes][male=yes][female!=yes] {
|
|---|
| 423 | throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
|
|---|
| [11146] | 424 | group: tr("suspicious tag combination");
|
|---|
| [10537] | 425 | }
|
|---|
| 426 | *[unisex=yes][female=yes][male=yes] {
|
|---|
| 427 | throwWarning: tr("{0} together with {1} and {2}. Remove {1} and {2}", "{0.tag}", "{1.tag}", "{2.tag}");
|
|---|
| [11146] | 428 | group: tr("suspicious tag combination");
|
|---|
| [10537] | 429 | fixRemove: "female";
|
|---|
| 430 | fixRemove: "male";
|
|---|
| 431 | }
|
|---|
| 432 | *[female=yes][male=yes][!unisex][shop=hairdresser] { /* for toilets male=yes female=yes unisex=no combination is valid */
|
|---|
| 433 | throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
|
|---|
| 434 | suggestAlternative: "unisex=yes";
|
|---|
| [11146] | 435 | group: tr("suspicious tag combination");
|
|---|
| [10537] | 436 | fixRemove: "female";
|
|---|
| 437 | fixRemove: "male";
|
|---|
| 438 | fixAdd: "unisex=yes";
|
|---|
| [10538] | 439 | }
|
|---|
| 440 |
|
|---|
| [11687] | 441 | /* #13138, 14468 */
|
|---|
| 442 | area:closed[water][natural!~/water|bay|strait/][water!=intermittent] { /* water=intermittent is deprecated and has an own warning */
|
|---|
| [10538] | 443 | throwWarning: tr("{0} without {1}", "{1.key}", "{2.tag}");
|
|---|
| [11146] | 444 | group: tr("missing tag");
|
|---|
| [10538] | 445 | }
|
|---|
| [11687] | 446 | way!:closed[water][natural!~/water|bay|strait/][water!=intermittent] {
|
|---|
| [10538] | 447 | throwWarning: tr("{0} without {1}", "{1.key}", "{2.tag}");
|
|---|
| [11146] | 448 | group: tr("missing tag");
|
|---|
| [10995] | 449 | }
|
|---|
| 450 |
|
|---|
| 451 | /* see #8519, #11529, limited to motorways and trunks to avoid false positives for streets with lanes for non motorized traffic */
|
|---|
| 452 | way[highway =~ /^(motorway|motorway_link|trunk|trunk_link)$/][lanes][turn:lanes ][tag(lanes)!=eval(count(split("|", tag("turn:lanes"))))],
|
|---|
| 453 | way[highway =~ /^(motorway|motorway_link|trunk|trunk_link)$/][lanes][change:lanes ][tag(lanes)!=eval(count(split("|", tag("change:lanes"))))],
|
|---|
| 454 | way[highway =~ /^(motorway|motorway_link|trunk|trunk_link)$/][lanes][maxspeed:lanes ][tag(lanes)!=eval(count(split("|", tag("maxspeed:lanes"))))],
|
|---|
| 455 | way[highway =~ /^(motorway|motorway_link|trunk|trunk_link)$/][lanes][minspeed:lanes ][tag(lanes)!=eval(count(split("|", tag("minspeed:lanes"))))],
|
|---|
| 456 | way[highway =~ /^(motorway|motorway_link|trunk|trunk_link)$/][lanes][destination:lanes ][tag(lanes)!=eval(count(split("|", tag("destination:lanes"))))],
|
|---|
| 457 | way[highway =~ /^(motorway|motorway_link|trunk|trunk_link)$/][lanes][destination:ref:lanes ][tag(lanes)!=eval(count(split("|", tag("destination:ref:lanes"))))],
|
|---|
| 458 | way[highway =~ /^(motorway|motorway_link|trunk|trunk_link)$/][lanes][destination:symbol:lanes][tag(lanes)!=eval(count(split("|", tag("destination:symbol:lanes"))))] {
|
|---|
| 459 | throwWarning: tr("Different number of lanes in the keys {0} and {1}", "{1.key}", "{2.key}");
|
|---|
| [11146] | 460 | group: tr("suspicious tag combination");
|
|---|
| [11047] | 461 | }
|
|---|
| 462 |
|
|---|
| 463 | /* #13680 */
|
|---|
| 464 | area[golf=bunker][natural=beach] {
|
|---|
| 465 | throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
|
|---|
| 466 | suggestAlternative: "natural=sand";
|
|---|
| 467 | suggestAlternative: "surface=sand";
|
|---|
| [11146] | 468 | group: tr("suspicious tag combination");
|
|---|
| [11080] | 469 | }
|
|---|
| 470 |
|
|---|
| 471 | /* #13705 */
|
|---|
| 472 | relation[type=multipolygon][building] > way {
|
|---|
| 473 | set part_of_building_MP;
|
|---|
| 474 | }
|
|---|
| 475 | way["addr:housenumber"][!building][!"building:part"][!"demolished:building"][!note][!amenity][!leisure][!landuse][!man_made][!tourism][!barrier]!.part_of_building_MP {
|
|---|
| 476 | /* don't exclude shop because a lot of real missing bulding tag cases have a shop tag. */
|
|---|
| [11146] | 477 | throwOther: tr("possibly missing {0} tag", "{1.key}");
|
|---|
| 478 | group: tr("missing tag");
|
|---|
| [11371] | 479 | }
|
|---|
| 480 |
|
|---|
| [11529] | 481 | /* #14125, #14323 */
|
|---|
| 482 | way[highway][lanes][!lanes:forward][!lanes:backward][oneway!=yes][oneway!=-1][junction!=roundabout][lanes>2][get(split(".", tag(lanes)/2), 1)=5] {
|
|---|
| [11406] | 483 | throwWarning: tr("street with odd number of {0}, but without {1} and {2} or {3}", "{1.key}", "{2.key}", "{3.key}", "{4.key}");
|
|---|
| [11371] | 484 | group: tr("missing tag");
|
|---|
| 485 | assertNoMatch: "way highway=primary lanes=2";
|
|---|
| 486 | assertNoMatch: "way highway=primary lanes=3 lanes:backward=2";
|
|---|
| 487 | assertNoMatch: "way highway=primary lanes=3 oneway=-1";
|
|---|
| [11406] | 488 | assertNoMatch: "way highway=primary lanes=4";
|
|---|
| [11371] | 489 | assertMatch: "way highway=primary lanes=3";
|
|---|
| [7818] | 490 | }
|
|---|