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 |
|
---|
5 | way[surface=~/^(unpaved|compacted|gravel|fine_gravel|pebblestone|ground|earth|dirt|grass|sand|mud|ice|salt|snow|woodchips)$/] { /* without grass_paver as it is controversial */
|
---|
6 | set unpaved_surface;
|
---|
7 | }
|
---|
8 |
|
---|
9 | /* {0.key} without {1.key} (warning level) */
|
---|
10 | way[junction ][!highway][junction!=yes][!area:highway],
|
---|
11 | way[living_street ][!highway],
|
---|
12 | way[maintenance ][!highway],
|
---|
13 | way[median ][!highway],
|
---|
14 | way[motorroad ][!highway],
|
---|
15 | node[ntd_id ][!highway],
|
---|
16 | way[sac_scale ][!highway],
|
---|
17 | way[sidewalk ][!highway],
|
---|
18 | way[step_count ][!highway][man_made!=tower],
|
---|
19 | way[tracktype ][!highway],
|
---|
20 | way[trail_visibility ][!highway], /* #15029 */
|
---|
21 | way[trolley_wire ][!highway],
|
---|
22 | way[zip_left ][!highway],
|
---|
23 | way[zip_right ][!highway],
|
---|
24 | way[detail ][!railway][route!=railway],
|
---|
25 | way[eddy_current_brake ][!railway][route!=railway],
|
---|
26 | way[electrified ][!railway][route!=railway][!highway], /* #16007 */
|
---|
27 | way[etcs ][!railway][route!=railway],
|
---|
28 | way[gauge ][!railway][route!=railway],
|
---|
29 | way[grade_of_track ][!railway][route!=railway],
|
---|
30 | way[kursbuchstrecke ][!railway][route!=railway],
|
---|
31 | way[lzb ][!railway][route!=railway],
|
---|
32 | way[old_railway_operator ][!railway][route!=railway],
|
---|
33 | way[operating_procedure ][!railway][route!=railway],
|
---|
34 | way[pzb ][!railway][route!=railway],
|
---|
35 | way[structure_gauge ][!railway][route!=railway],
|
---|
36 | way[tilting_technology ][!railway][route!=railway],
|
---|
37 | way[track_class ][!railway][route!=railway],
|
---|
38 | way[tracks ][!railway][route!=railway],
|
---|
39 | way[traffic_mode ][!railway][route!=railway],
|
---|
40 | way[workrules ][!railway][route!=railway],
|
---|
41 | way[length_unit ][!waterway],
|
---|
42 | way[canal ][!waterway],
|
---|
43 | way[have_riverbank ][!waterway],
|
---|
44 | *[border_type ][!boundary],
|
---|
45 | *[piste:difficulty ][!piste:type],
|
---|
46 | *[place ][!name][place!=islet],
|
---|
47 | *[transformer ][!power],
|
---|
48 | *[source:date ][!source],
|
---|
49 | *[source:name ][!name][noname!=yes],
|
---|
50 | *[source:maxspeed:forward ][!maxspeed:forward][!maxspeed],
|
---|
51 | *[source:maxspeed:backward ][!maxspeed:backward][!maxspeed],
|
---|
52 | *[source:building ][!building],
|
---|
53 | *[source:ref ][!ref][noref!=yes],
|
---|
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],
|
---|
69 | *[source:postcode ][!addr:postcode],
|
---|
70 | *[source:housenumber ][!addr:housenumber],
|
---|
71 | *[source:addr:postcode ][!addr:postcode],
|
---|
72 | *[source:addr:housenumber ][!addr:housenumber] {
|
---|
73 | throwWarning: tr("{0} without {1}", "{0.key}", "{1.key}");
|
---|
74 | group: tr("missing tag");
|
---|
75 | assertMatch: "node source:addr:postcode=postman";
|
---|
76 | }
|
---|
77 |
|
---|
78 | /* {0.key} without {1.key} (info level) */
|
---|
79 | way[lanes:forward][!lanes:backward][oneway!=yes][oneway!=-1],
|
---|
80 | way[lanes:backward][!lanes:forward][oneway!=yes][oneway!=-1],
|
---|
81 | *[leaf_type ][!leaf_cycle],
|
---|
82 | *[leaf_cycle][!leaf_type] {
|
---|
83 | throwOther: tr("{0} without {1}", "{0.key}", "{1.key}");
|
---|
84 | group: tr("missing tag");
|
---|
85 | }
|
---|
86 |
|
---|
87 | /* {0.key} without {1.tag}, #17997 */
|
---|
88 | node[railway:switch ][railway!=switch],
|
---|
89 | *[generator:source ][power!=generator],
|
---|
90 | *[generator:method ][power!=generator],
|
---|
91 | *[generator:type ][power!=generator],
|
---|
92 | node[fire_hydrant:type ][emergency!=fire_hydrant][disused:emergency!=fire_hydrant],
|
---|
93 | node[manhole ][man_made!=manhole],
|
---|
94 | way[fence_type ][barrier!=fence],
|
---|
95 | *[recycling_type ][amenity!=recycling],
|
---|
96 | *[information ][tourism!=information],
|
---|
97 | node[board_type ][information!=board],
|
---|
98 | *[shelter_type ][amenity!=shelter],
|
---|
99 | node[lamp_type ][highway!=street_lamp],
|
---|
100 | node[map_type ][information!=map],
|
---|
101 | *[site_type ][historic!=archaeological_site],
|
---|
102 | *[artwork_type ][tourism!=artwork][exhibit!=artwork],
|
---|
103 | *[castle_type ][historic!=castle],
|
---|
104 | *[parking ][amenity!~/^(parking|parking_space|parking_entrance|motorcycle_parking)$/][parking!=yes][parking!=no],
|
---|
105 | way[cutline ][man_made!=cutline],
|
---|
106 | *[bunker_type ][military!=bunker] {
|
---|
107 | throwWarning: tr("{0} without {1}", "{0.key}", "{1.tag}");
|
---|
108 | group: tr("missing tag");
|
---|
109 | }
|
---|
110 |
|
---|
111 | /* {0.key} without {1.tag} or {2.tag}, #15107 */
|
---|
112 | *[iata ][aeroway!=aerodrome][aeroway!=helipad],
|
---|
113 | *[icao ][aeroway!=aerodrome][aeroway!=helipad],
|
---|
114 | *[bridge:movable ][bridge!=movable][man_made!=bridge],
|
---|
115 | *[substation ][power!=substation][pipeline!=substation],
|
---|
116 | *[reservoir_type ][landuse!=reservoir][water!=reservoir],
|
---|
117 | way[waterway=pressurised ][tunnel!=flooded][man_made!=pipeline] {
|
---|
118 | throwWarning: tr("{0} without {1} or {2}", "{0.key}", "{1.tag}", "{2.tag}");
|
---|
119 | group: tr("missing tag");
|
---|
120 | }
|
---|
121 |
|
---|
122 | /* {0.tag} without {1.key} (warning level), #18411, #18246 */
|
---|
123 | way[railway=construction][!construction],
|
---|
124 | way[highway=construction][!construction],
|
---|
125 | node[traffic_sign=maxspeed][!maxspeed][!/^maxspeed:.+/],
|
---|
126 | node[actuator=manual][!handle],
|
---|
127 | node[emergency=fire_hydrant][!fire_hydrant:type],
|
---|
128 | way[ boundary=administrative][!admin_level],
|
---|
129 | relation[boundary=administrative][!admin_level],
|
---|
130 | relation[route=bicycle ][!network][type=route],
|
---|
131 | relation[route=hiking ][!network][type=route],
|
---|
132 | relation[route=foot ][!network][type=route],
|
---|
133 | relation[route=horse ][!network][type=route],
|
---|
134 | relation[route=piste][!piste:type][type=route],
|
---|
135 | relation[route=ski ][!piste:type][type=route],
|
---|
136 | *[tourism=information][!information],
|
---|
137 | *[leisure=pitch][!sport],
|
---|
138 | *[aeroway=terminal][!building],
|
---|
139 | *[office=government][!government],
|
---|
140 | *[power=generator][!generator:source],
|
---|
141 | *[amenity=social_facility][!social_facility],
|
---|
142 | *[amenity=place_of_worship][!religion],
|
---|
143 | *[man_made=tower][!tower:type] {
|
---|
144 | throwWarning: tr("{0} without {1}", "{0.tag}", "{1.key}");
|
---|
145 | group: tr("missing tag");
|
---|
146 | assertNoMatch: "node traffic_sign=maxspeed maxspeed:hgv:conditional=\"80 @ (weight>7.5 AND 22:00-05:00)\"";
|
---|
147 | }
|
---|
148 |
|
---|
149 | /* {0.tag} without {1.key} (info level), #15107 */
|
---|
150 | *[aeroway=runway ][!ref],
|
---|
151 | *[aeroway=runway ][!surface],
|
---|
152 | node[highway=crossing ][!crossing],
|
---|
153 | way[highway=track ][!tracktype],
|
---|
154 | way[power=cable ][!location],
|
---|
155 | node[power=transformer ][!voltage:primary],
|
---|
156 | node[power=transformer ][!voltage:secondary],
|
---|
157 | node[transformer=distribution ][!voltage:primary][power=pole],
|
---|
158 | node[transformer=distribution ][!voltage:secondary][power=pole],
|
---|
159 | way[power=line ][!voltage],
|
---|
160 | way[power=minor_line ][!voltage],
|
---|
161 | way[power=cable ][!voltage],
|
---|
162 | *[power=generator ][!voltage][generator:output:electricity],
|
---|
163 | *[power=plant ][!voltage][plant:output:electricity],
|
---|
164 | *[power=substation ][!substation],
|
---|
165 | *[power=switch ][!switch],
|
---|
166 | *[power=transformer ][!transformer],
|
---|
167 | *[amenity=bank ][!operator],
|
---|
168 | *[amenity=cinema ][!operator],
|
---|
169 | *[amenity=fast_food ][!operator],
|
---|
170 | *[amenity=fuel ][!operator],
|
---|
171 | *[mountain_pass=yes ][!ele],
|
---|
172 | *[natural=peak ][!ele],
|
---|
173 | *[natural=water ][!water],
|
---|
174 | *[amenity=place_of_worship ][!denomination],
|
---|
175 | *[amenity=parking ][!parking],
|
---|
176 | *[amenity=parking_entrance ][!parking] {
|
---|
177 | throwOther: tr("{0} without {1}", "{0.tag}", "{1.key}");
|
---|
178 | group: tr("missing tag");
|
---|
179 | assertMatch: "way power=line";
|
---|
180 | assertNoMatch: "way power=line voltage=1";
|
---|
181 | assertMatch: "way power=switch";
|
---|
182 | assertMatch: "way power=substation";
|
---|
183 | assertMatch: "way power=substation transformer=foobar";
|
---|
184 | assertNoMatch: "way power=substation substation=foobar";
|
---|
185 | assertMatch: "way power=generator generator:output:electricity=yes";
|
---|
186 | assertNoMatch: "way power=generator";
|
---|
187 | assertNoMatch: "way power=generator generator:output:electricity=yes voltage=1";
|
---|
188 | }
|
---|
189 |
|
---|
190 | /* {0.key} without {1.key} or {2.tag} */
|
---|
191 | way[bridge:structure ][!bridge][man_made!=bridge],
|
---|
192 | *[segregated ][!highway][railway!=crossing] {
|
---|
193 | throwWarning: tr("{0} without {1} or {2}", "{0.key}", "{1.key}", "{2.tag}");
|
---|
194 | group: tr("missing tag");
|
---|
195 | }
|
---|
196 |
|
---|
197 | /* {0.tag} without {1.tag} (info level) see #11600 #11393 #11850 */
|
---|
198 | way[highway=motorway][!oneway][junction!=roundabout],
|
---|
199 | way[highway=motorway_link][!oneway][junction!=roundabout] {
|
---|
200 | throwOther: tr("{0} without {1}", "{0.tag}", "{1.tag}");
|
---|
201 | group: tr("missing tag");
|
---|
202 | }
|
---|
203 |
|
---|
204 | /* {0.tag} without {1.tag} */
|
---|
205 | way[usage=penstock][man_made!=pipeline],
|
---|
206 | way[usage=penstock][waterway!=pressurised] {
|
---|
207 | throwWarning: tr("{0} without {1}", "{0.tag}", "{1.tag}");
|
---|
208 | group: tr("missing tag");
|
---|
209 | }
|
---|
210 |
|
---|
211 | /* {0.tag} without {1.tag} or {2.tag} */
|
---|
212 | *[amenity=recycling][recycling_type!=container][recycling_type!=centre] {
|
---|
213 | throwWarning: tr("{0} without {1} or {2}", "{0.tag}", "{1.tag}", "{2.tag}");
|
---|
214 | group: tr("missing tag");
|
---|
215 | }
|
---|
216 |
|
---|
217 | /* {0.key} without {1.key}, {2.tag}, {3.tag} or {4.key} */
|
---|
218 | *[smoothness][!highway][amenity!~/^(parking|parking_space|parking_entrance|motorcycle_parking|bicycle_parking)$/][barrier!=kerb][!kerb] {
|
---|
219 | throwWarning: tr("{0} without {1}, {2}, {3} or {4}", "{0.key}", "{1.key}", "{2.tag}", "{3.tag}", "{4.key}");
|
---|
220 | group: tr("missing tag");
|
---|
221 | }
|
---|
222 |
|
---|
223 | /* {0.key} without {1.key}, {2.tag}, {3.tag} or {4.tag} */
|
---|
224 | *[intermittent ][!waterway][natural!~/^(water|spring)$/][landuse!~/^(basin|reservoir)$/][ford!=yes],
|
---|
225 | *[boat ][!waterway][natural!=water ][landuse!~/^(basin|reservoir)$/][ford!=yes] {
|
---|
226 | throwWarning: tr("{0} without {1}, {2}, {3} or {4}", "{0.key}", "{1.key}", "{2.tag}", "{3.tag}", "{4.tag}");
|
---|
227 | group: tr("missing tag");
|
---|
228 | }
|
---|
229 |
|
---|
230 | /* {0.key} without {1.key}, {2.key} or {3.key} */
|
---|
231 | *[snowplowing][!highway][!amenity][!leisure] {
|
---|
232 | throwWarning: tr("{0} without {1}, {2} or {3}", "{0.key}", "{1.key}", "{2.key}", "{3.key}");
|
---|
233 | group: tr("missing tag");
|
---|
234 | }
|
---|
235 |
|
---|
236 | /* {0.key} without {1.key}, {2.key} or {3.tag} */
|
---|
237 | *[toll ][!highway][!barrier][route!~/^(ferry|road)$/] {
|
---|
238 | throwWarning: tr("{0} without {1}, {2} or {3}", "{0.key}", "{1.key}", "{2.key}", "{3.tag}");
|
---|
239 | group: tr("missing tag");
|
---|
240 | }
|
---|
241 |
|
---|
242 | /* {0.tag} together with {1.key}, see #17664, #17707, #16464, #10837, #14034, #9389, #11977, #13156, #16888 */
|
---|
243 | *[power=plant][/^generator:/],
|
---|
244 | *[power=generator][/^plant:/],
|
---|
245 | *[power=plant][voltage],
|
---|
246 | *[power=plant][frequency],
|
---|
247 | *[internet_access=no][internet_access:fee],
|
---|
248 | node[power=transformer][voltage],
|
---|
249 | node[transformer=distribution][voltage][power=pole],
|
---|
250 | *[amenity=vending_machine][shop],
|
---|
251 | *[noname?][name],
|
---|
252 | way[oneway=yes][/:backward/][!traffic_sign:backward][bicycle:backward!=use_sidepath][oneway:bicycle!=no][oneway:psv!=no],
|
---|
253 | way[oneway=yes][/:forward/ ][!traffic_sign:forward ][bicycle:forward!=use_sidepath ][oneway:bicycle!=no][oneway:psv!=no],
|
---|
254 | way[oneway=-1 ][/:backward/][!traffic_sign:backward][bicycle:backward!=use_sidepath][oneway:bicycle!=no][oneway:psv!=no],
|
---|
255 | way[oneway=-1 ][/:forward/ ][!traffic_sign:forward ][bicycle:forward!=use_sidepath ][oneway:bicycle!=no][oneway:psv!=no] {
|
---|
256 | throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.key}");
|
---|
257 | group: tr("suspicious tag combination");
|
---|
258 | assertMatch: "way power=plant generator:source=wind";
|
---|
259 | assertMatch: "way power=generator plant:source=combustion";
|
---|
260 | }
|
---|
261 |
|
---|
262 | /* {0.tag} together with {1.tag} (info level), see #9696 */
|
---|
263 | way[highway=footway][oneway=no] {
|
---|
264 | throwOther: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
|
---|
265 | group: tr("suspicious tag combination");
|
---|
266 | }
|
---|
267 |
|
---|
268 | /* {0.tag} together with {1.tag}, see #18411, #17950, #17330, #17623, #17592, #17594, #17542, #16861, #16147, #10186 */
|
---|
269 | *[barrier=kerb][kerb=no],
|
---|
270 | way[highway=construction][construction=yes],
|
---|
271 | way[railway=construction][construction=yes],
|
---|
272 | *[man_made=bridge][bridge=yes],
|
---|
273 | *[man_made=tunnel][tunnel=yes],
|
---|
274 | *[amenity=police][police],
|
---|
275 | node[highway=crossing][crossing=no],
|
---|
276 | node[railway=crossing][crossing=no],
|
---|
277 | way[junction=yes][highway],
|
---|
278 | way[tracktype=grade1][surface].unpaved_surface,
|
---|
279 | way[tracktype=grade2][surface][surface=~/^(sand|mud)$/],
|
---|
280 | way[segregated][bicycle=no],
|
---|
281 | way[segregated][foot=no],
|
---|
282 | way[man_made=pipeline][tunnel=flooded],
|
---|
283 | way[waterway=canal][tunnel=yes] {
|
---|
284 | throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
|
---|
285 | group: tr("suspicious tag combination");
|
---|
286 | }
|
---|
287 |
|
---|
288 | /* {0.tag} together with {1.tag} (error level) */
|
---|
289 | relation[type=multipolygon][area=no] {
|
---|
290 | throwError: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
|
---|
291 | group: tr("suspicious tag combination");
|
---|
292 | }
|
---|
293 |
|
---|
294 | /* {0.key} together with {1.key}, #18267, #17630, #17604 */
|
---|
295 | node[marker][cover],
|
---|
296 | node[marker][voltage],
|
---|
297 | node[marker][pressure],
|
---|
298 | node[marker][diameter],
|
---|
299 | node[marker][substance],
|
---|
300 | *[building:part][building],
|
---|
301 | *[addr:street][addr:place][outside("CZ,DK")] {
|
---|
302 | throwWarning: tr("{0} together with {1}", "{0.key}", "{1.key}");
|
---|
303 | group: tr("suspicious tag combination");
|
---|
304 | }
|
---|
305 |
|
---|
306 | /* {0.tag} together with {1.tag} and {2.key}, #18471 */
|
---|
307 | way[highway=~/^(cycleway|footway|path)$/][segregated=no][sidewalk =~/^(left|right|both)$/] {
|
---|
308 | throwWarning: tr("{0} together with {1} and {2}", "{0.tag}", "{1.tag}", "{2.key}");
|
---|
309 | group: tr("suspicious tag combination");
|
---|
310 | }
|
---|
311 |
|
---|
312 | /* {0.key} together with {1.tag} and {2.key}, #19747 */
|
---|
313 | way[railway][electrified=no][frequency],
|
---|
314 | way[railway][electrified=no][voltage] {
|
---|
315 | throwWarning: tr("{0} together with {1} and {2}", "{0.key}", "{1.tag}", "{2.key}");
|
---|
316 | group: tr("suspicious tag combination");
|
---|
317 | }
|
---|
318 |
|
---|
319 | /* #11127, #13727 */
|
---|
320 | way[waterway][bridge=yes][waterway!=weir] {
|
---|
321 | throwWarning: tr("{0} together with {1}", "{0.key}", "{1.tag}");
|
---|
322 | suggestAlternative: "bridge=aqueduct";
|
---|
323 | group: tr("suspicious tag combination");
|
---|
324 | fixAdd: "bridge=aqueduct";
|
---|
325 | }
|
---|
326 | way[waterway=weir][bridge=yes][highway] {
|
---|
327 | throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
|
---|
328 | suggestAlternative: "waterway=weir + ford=yes";
|
---|
329 | suggestAlternative: "waterway=dam";
|
---|
330 | suggestAlternative: tr("two objects, one with {0} and one with {1} + {2} + {3}", "{0.tag}", "{2.key}", "{1.tag}", "layer");
|
---|
331 | group: tr("suspicious tag combination");
|
---|
332 | }
|
---|
333 |
|
---|
334 | /* #16214 */
|
---|
335 | relation[type=multipolygon] >[role="inner"] way[area][eval(number_of_tags()) = 1] {
|
---|
336 | throwWarning: tr("{0} on an inner multipolygon ring without further tags", "{0.tag}");
|
---|
337 | fixRemove: "area";
|
---|
338 | set area_yes_autofix;
|
---|
339 | group: tr("suspicious tag combination");
|
---|
340 | }
|
---|
341 |
|
---|
342 | /* only {0.key}, #11104, #12422, #14950, #19572 */
|
---|
343 | *[lanes][eval(number_of_tags()) = 1],
|
---|
344 | *[surface][eval(number_of_tags()) = 1],
|
---|
345 | *[access][eval(number_of_tags()) = 1],
|
---|
346 | *[area][eval(number_of_tags()) = 1]!.area_yes_autofix,
|
---|
347 | *[name][eval(number_of_tags()) = 1],
|
---|
348 | *[ref][eval(number_of_tags()) = 1],
|
---|
349 | *[lit][eval(number_of_tags()) = 1] {
|
---|
350 | throwWarning: tr("incomplete object: only {0}", "{0.key}");
|
---|
351 | set only_one_tag;
|
---|
352 | group: tr("missing tag");
|
---|
353 | }
|
---|
354 | /* only {0.key} and {1.key} */
|
---|
355 | *[name][area][eval(number_of_tags()) = 2],
|
---|
356 | *[name][ref][eval(number_of_tags()) = 2] {
|
---|
357 | throwWarning: tr("incomplete object: only {0} and {1}", "{0.key}", "{1.key}");
|
---|
358 | group: tr("missing tag");
|
---|
359 | }
|
---|
360 | /* only {0.tag}, #15269 */
|
---|
361 | *[tourism=attraction][eval(number_of_tags()) = 1] {
|
---|
362 | throwWarning: tr("incomplete object: only {0}", "{0.tag}");
|
---|
363 | group: tr("missing tag");
|
---|
364 | }
|
---|
365 | /* only {0.key} and {1.tag} */
|
---|
366 | *[name][tourism=attraction][eval(number_of_tags()) = 2] {
|
---|
367 | throwWarning: tr("incomplete object: only {0} and {1}", "{0.key}", "{1.tag}");
|
---|
368 | group: tr("missing tag");
|
---|
369 | }
|
---|
370 |
|
---|
371 | /* #9811, #11491, #12865, #14310 */
|
---|
372 | *[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)$/],
|
---|
373 | /* addr:postcode is used together with place in some countries */
|
---|
374 | *[boundary][/^addr:/],
|
---|
375 | *[highway][/^addr:/][highway!=services][highway!=rest_area][!"addr:postcode"] {
|
---|
376 | throwWarning: tr("{0} together with {1}", "{0.key}", "addr:*");
|
---|
377 | group: tr("suspicious tag combination");
|
---|
378 | assertMatch: "node place=foo addr:housenumber=5";
|
---|
379 | assertMatch: "node place=foo addr:housenumber=5 addr:postcode=12345";
|
---|
380 | assertNoMatch: "node place=foo addr:postcode=12345";
|
---|
381 | }
|
---|
382 | *[!highway][postal_code]["addr:postcode"][postal_code=*"addr:postcode"] {
|
---|
383 | throwWarning: tr("{0} together with {1}", "{1.key}", "{2.key}");
|
---|
384 | group: tr("suspicious tag combination");
|
---|
385 | }
|
---|
386 | *[!highway][postal_code]["addr:postcode"][postal_code!=*"addr:postcode"] {
|
---|
387 | throwWarning: tr("{0} together with {1} and conflicting values", "{1.key}", "{2.key}");
|
---|
388 | group: tr("suspicious tag combination");
|
---|
389 | }
|
---|
390 | way[highway][postal_code]["addr:postcode"][postal_code=*"addr:postcode"] {
|
---|
391 | throwWarning: tr("{0} together with {1}", "{1.key}", "{2.key}");
|
---|
392 | group: tr("suspicious tag combination");
|
---|
393 | fixRemove: "addr:postcode";
|
---|
394 | }
|
---|
395 | way[highway][postal_code]["addr:postcode"][postal_code!=*"addr:postcode"] {
|
---|
396 | throwWarning: tr("{0} together with {1} and conflicting values", "{1.key}", "{2.key}");
|
---|
397 | group: tr("suspicious tag combination");
|
---|
398 | }
|
---|
399 | way[highway][highway!=services][highway!=rest_area][!postal_code]["addr:postcode"] {
|
---|
400 | throwWarning: tr("{0} together with {1}", "{0.key}", "{4.key}");
|
---|
401 | suggestAlternative: "postal_code";
|
---|
402 | group: tr("suspicious tag combination");
|
---|
403 | fixChangeKey: "addr:postcode=>postal_code";
|
---|
404 | }
|
---|
405 |
|
---|
406 | /* #9195 */
|
---|
407 | way[highway=footway][cycleway=lane] {
|
---|
408 | throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
|
---|
409 | suggestAlternative: "highway=path + foot=designated + bicycle=designated + segregated=yes";
|
---|
410 | group: tr("suspicious tag combination");
|
---|
411 | }
|
---|
412 |
|
---|
413 | /* {0} on suspicious object, #17255, #19650, #19572, #17253, #19821, #15667, #19930 */
|
---|
414 | way[oneway ][!highway][!railway][!aerialway][attraction!=summer_toboggan][aeroway!~/^(runway|taxiway)$/][leisure!=track][waterway !~ /^(canal|fairway|lock|river|tidal_channel)$/],
|
---|
415 | node[lanes ][!barrier][!ford][highway!=mini_roundabout][!junction][leisure!~/^(bowling_alley|slipway|swimming_pool|track)$/][!traffic_calming]!.only_one_tag,
|
---|
416 | way[lanes ][!barrier][!ford][!highway ][!junction][leisure!~/^(bowling_alley|slipway|swimming_pool|track)$/][!traffic_calming]!.only_one_tag,
|
---|
417 | *[tunnel ][!highway][!railway][!waterway][!piste:type][public_transport!=platform][route!=ferry][man_made!=pipeline][man_made!=goods_conveyor][man_made!=wildlife_crossing][man_made!=tunnel],
|
---|
418 | *[bridge ][!highway][!railway][!waterway][!piste:type][public_transport!=platform][route!=ferry][man_made!=pipeline][man_made!=goods_conveyor][man_made!=wildlife_crossing][man_made!=bridge][building!=bridge],
|
---|
419 | *[psv ][!highway][!railway][!waterway][barrier!=bollard][amenity !~ /^parking.*/],
|
---|
420 | *[width ][!highway][!railway][!waterway][!aeroway][!cycleway][!footway][!barrier][!man_made][!entrance][natural!=stone][leisure!=track],
|
---|
421 | *[maxspeed ][!highway][!railway][traffic_sign !~ /^((.*;)?maxspeed(;.*)?|[A-Z][A-Z]:.+)$/][traffic_sign:forward !~ /^((.*;)?maxspeed(;.*)?|[A-Z][A-Z]:.+)$/][traffic_sign:backward !~ /^((.*;)?maxspeed(;.*)?|[A-Z][A-Z]:.+)$/][type != enforcement][waterway !~ /^(canal|fairway|lock|river|tidal_channel)$/][!traffic_calming][aerialway!=zip_line],
|
---|
422 | way[incline][!highway][!railway][aeroway!~/^(runway|taxiway)$/][attraction!=summer_toboggan][leisure!=slipway] {
|
---|
423 | throwWarning: tr("{0} on suspicious object", "{0.key}");
|
---|
424 | group: tr("suspicious tag combination");
|
---|
425 | }
|
---|
426 |
|
---|
427 | /* #15667, #19930 */
|
---|
428 | way[waterway][oneway][waterway =~ /^(canal|fairway|lock|river|tidal_channel)$/] {
|
---|
429 | throwOther: tr("{0} together with {1}. The flow direction is defined by the way direction. Use {1} on {0} only in the rare case of a access restriction.", "{0.key}", "{1.key}");
|
---|
430 | group: tr("suspicious tag combination");
|
---|
431 | }
|
---|
432 |
|
---|
433 | *[amenity][amenity =~ /^(restaurant|cafe|fast_food|pub|place_of_worship|school|university|hospital|library|theatre|courthouse|bank|cinema|pharmacy|fuel)$/][!name][noname!=yes] {
|
---|
434 | throwOther: tr("{0} without {1}", "{0.tag}", "{2.key}");
|
---|
435 | group: tr("missing tag");
|
---|
436 | assertMatch: "node amenity=restaurant";
|
---|
437 | assertNoMatch: "node amenity=restaurant noname=yes";
|
---|
438 | assertNoMatch: "node amenity=restaurant name=Foobar";
|
---|
439 | }
|
---|
440 |
|
---|
441 | /* #10193, #16157 */
|
---|
442 | way[highway][barrier],
|
---|
443 | *[highway][waterway][waterway!=dam][waterway!=weir],
|
---|
444 | way[highway][natural][natural!=ridge],
|
---|
445 | *[landuse][building][landuse!=retail] {
|
---|
446 | throwWarning: tr("{0} together with {1}", "{0.key}", "{1.key}");
|
---|
447 | group: tr("suspicious tag combination");
|
---|
448 | assertNoMatch: "node highway=street_lamp natural=birds_nest";
|
---|
449 | }
|
---|
450 |
|
---|
451 | /* #6932 */
|
---|
452 | *[natural=water][leisure=swimming_pool] {
|
---|
453 | throwWarning: tr("natural water used for swimming pool");
|
---|
454 | group: tr("suspicious tag combination");
|
---|
455 | fixRemove: "natural";
|
---|
456 | }
|
---|
457 |
|
---|
458 | /* #9593, #11183, #12418, #12761, #17254, #19311 */
|
---|
459 | *[sport][sport!=skiing][!building][!club][tourism != hotel][highway !~ /^(pedestrian|raceway)$/][!leisure][natural !~ /^(beach|bare_rock|cliff|peak|water)$/][amenity !~ /^(bar|dojo|pub|restaurant|swimming_pool)$/][landuse !~ /^(recreation_ground|piste|farm|farmland)$/][barrier !~ /^(wall|retaining_wall)$/][!"piste:type"][shop!=sports][attraction!=summer_toboggan] {
|
---|
460 | throwWarning: tr("sport without physical feature");
|
---|
461 | group: tr("missing tag");
|
---|
462 | assertMatch: "node sport=tennis";
|
---|
463 | assertNoMatch: "node sport=tennis leisure=pitch";
|
---|
464 | assertNoMatch: "node sport=beachvolleyball natural=beach";
|
---|
465 | assertNoMatch: "node sport=skiing"; /* skiing has deprecated warning */
|
---|
466 | assertNoMatch: "node sport=swimming tourism=hotel";
|
---|
467 | assertNoMatch: "node sport=10pin amenity=restaurant";
|
---|
468 | }
|
---|
469 |
|
---|
470 | /* {0.key} without {1.key} or {2.key} see #10140 */
|
---|
471 | *[building:levels][!building][!building:part],
|
---|
472 | way[usage][!railway][!waterway][route!=railway][man_made!=pipeline] {
|
---|
473 | throwWarning: tr("{0} without {1} or {2}", "{0.key}", "{1.key}", "{2.key}");
|
---|
474 | group: tr("missing tag");
|
---|
475 | }
|
---|
476 |
|
---|
477 | /* any other *_name tag (with some exceptions) but not a name , see #10837 #11297 #11539 #16437 #17026 */
|
---|
478 | *[/_name$/][!name][!old_name][!loc_name][!reg_name][!uic_name][!artist_name][!lock_name][!"osak:municipality_name"][!"osak:street_name"][noname!=yes] {
|
---|
479 | throwWarning: tr("alternative name without {0}", "{1.key}");
|
---|
480 | group: tr("missing tag");
|
---|
481 | }
|
---|
482 |
|
---|
483 | /* #19604 */
|
---|
484 | way[name][alt_name][name=*alt_name] {
|
---|
485 | throwWarning: tr("Same value of {0} and {1}", "{0.key}", "{1.key}");
|
---|
486 | group: tr("suspicious tag combination");
|
---|
487 | fixRemove: "alt_name";
|
---|
488 | }
|
---|
489 |
|
---|
490 | /* #10837 */
|
---|
491 | way[destination][!oneway?][junction!=roundabout][highway] {
|
---|
492 | throwWarning: tr("incomplete usage of {0} on a way without {1}", "{0.key}", "{1.key}");
|
---|
493 | suggestAlternative: "destination:forward";
|
---|
494 | suggestAlternative: "destination:backward";
|
---|
495 | }
|
---|
496 |
|
---|
497 | /* #11389, #19010 */
|
---|
498 | way[maxspeed:forward][maxspeed:backward][!maxspeed]["maxspeed:forward"=*"maxspeed:backward"] {
|
---|
499 | throwWarning: tr("Same value of {0} and {1}", "{0.key}", "{1.key}");
|
---|
500 | suggestAlternative: "maxspeed";
|
---|
501 | group: tr("suspicious tag combination");
|
---|
502 | fixChangeKey: "maxspeed:forward=>maxspeed";
|
---|
503 | fixRemove: "maxspeed:backward";
|
---|
504 | }
|
---|
505 | way[maxspeed:forward][maxspeed:backward][maxspeed]["maxspeed:forward"=*maxspeed]["maxspeed:backward"=*maxspeed] {
|
---|
506 | throwWarning: tr("Same value of {0}, {1} and {2}", "{0.key}", "{1.key}", "{2.key}");
|
---|
507 | set AllSameMaxspeed;
|
---|
508 | suggestAlternative: "maxspeed";
|
---|
509 | group: tr("suspicious tag combination");
|
---|
510 | fixRemove: "maxspeed:forward";
|
---|
511 | fixRemove: "maxspeed:backward";
|
---|
512 | }
|
---|
513 | way[cycleway:left][cycleway:right][!cycleway]["cycleway:left"=*"cycleway:right"] {
|
---|
514 | throwWarning: tr("Same value of {0} and {1}", "{0.key}", "{1.key}");
|
---|
515 | suggestAlternative: "cycleway";
|
---|
516 | group: tr("suspicious tag combination");
|
---|
517 | fixChangeKey: "cycleway:left=>cycleway";
|
---|
518 | fixRemove: "cycleway:right";
|
---|
519 | }
|
---|
520 | way[cycleway:left][cycleway:right][cycleway]["cycleway:left"=*cycleway]["cycleway:right"=*cycleway] {
|
---|
521 | throwWarning: tr("Same value of {0}, {1} and {2}", "{0.key}", "{1.key}", "{2.key}");
|
---|
522 | set AllSameCycleway;
|
---|
523 | suggestAlternative: "cycleway";
|
---|
524 | group: tr("suspicious tag combination");
|
---|
525 | fixRemove: "cycleway:left";
|
---|
526 | fixRemove: "cycleway:right";
|
---|
527 | }
|
---|
528 | way[sidewalk:left][sidewalk:right][!sidewalk]["sidewalk:left"=*"sidewalk:right"] {
|
---|
529 | throwWarning: tr("Same value of {0} and {1}", "{0.key}", "{1.key}");
|
---|
530 | suggestAlternative: "sidewalk";
|
---|
531 | group: tr("suspicious tag combination");
|
---|
532 | fixChangeKey: "sidewalk:left=>sidewalk";
|
---|
533 | fixRemove: "sidewalk:right";
|
---|
534 | }
|
---|
535 | way[sidewalk:left][sidewalk:right][sidewalk]["sidewalk:left"=*sidewalk]["sidewalk:right"=*sidewalk] {
|
---|
536 | throwWarning: tr("Same value of {0}, {1} and {2}", "{0.key}", "{1.key}", "{2.key}");
|
---|
537 | set AllSameSidewalk;
|
---|
538 | suggestAlternative: "sidewalk";
|
---|
539 | group: tr("suspicious tag combination");
|
---|
540 | fixRemove: "sidewalk:left";
|
---|
541 | fixRemove: "sidewalk:right";
|
---|
542 | }
|
---|
543 | way["maxspeed:forward"]["maxspeed:backward"][maxspeed]!.AllSameMaxspeed,
|
---|
544 | way["cycleway:left"]["cycleway:right"][cycleway]!.AllSameCycleway,
|
---|
545 | way["sidewalk:left"]["sidewalk:right"][sidewalk]!.AllSameSidewalk {
|
---|
546 | throwWarning: tr("{0} and {1} together with {2} and conflicting values", "{0.key}", "{1.key}", "{2.key}");
|
---|
547 | group: tr("suspicious tag combination");
|
---|
548 | }
|
---|
549 | way["maxspeed:forward"][maxspeed][!"maxspeed:backward"],
|
---|
550 | way["maxspeed:backward"][maxspeed][!"maxspeed:forward"],
|
---|
551 | way["cycleway:left"][cycleway][!"cycleway:right"],
|
---|
552 | way["cycleway:right"][cycleway][!"cycleway:left"],
|
---|
553 | way["sidewalk:left"][sidewalk][!"sidewalk:right"],
|
---|
554 | way["sidewalk:right"][sidewalk][!"sidewalk:left"] {
|
---|
555 | throwWarning: tr("{0} together with {1}", "{0.key}", "{1.key}");
|
---|
556 | group: tr("suspicious tag combination");
|
---|
557 | }
|
---|
558 |
|
---|
559 | /* #11837 */
|
---|
560 | way[layer][layer<0][bridge][bridge!=no][location!=underground][indoor!=yes][!tunnel],
|
---|
561 | way[layer][layer>0][tunnel][tunnel!=no][location!=overground][indoor!=yes][!bridge] {
|
---|
562 | throwWarning: tr("{0} together with {1}", "{2.tag}", "{0.tag}");
|
---|
563 | group: tr("suspicious tag combination");
|
---|
564 | }
|
---|
565 |
|
---|
566 | /* #12942 */
|
---|
567 | relation[oneway][type!=route] {
|
---|
568 | throwWarning: tr("{0} on a relation without {1}", "{0.key}", "{1.tag}");
|
---|
569 | }
|
---|
570 |
|
---|
571 | /* #9182 */
|
---|
572 | way[waterway][layer][layer=~/^(-1|-2|-3|-4|-5)$/][!tunnel][culvert!=yes][covered!=yes][pipeline!=yes][location!=underground][eval(waylength()) > 400] {
|
---|
573 | 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}");
|
---|
574 | group: tr("suspicious tag combination");
|
---|
575 | }
|
---|
576 | way[waterway][layer][layer=~/^(-1|-2|-3|-4|-5)$/][!tunnel][culvert!=yes][covered!=yes][pipeline!=yes][location!=underground][eval(waylength()) <= 400] {
|
---|
577 | 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}");
|
---|
578 | group: tr("suspicious tag combination");
|
---|
579 | }
|
---|
580 |
|
---|
581 | /* #13144, #15536 */
|
---|
582 | *[unisex=yes][female=yes][male!=yes][shop=hairdresser],
|
---|
583 | *[unisex=yes][male=yes][female!=yes][shop=hairdresser] {
|
---|
584 | throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
|
---|
585 | group: tr("suspicious tag combination");
|
---|
586 | }
|
---|
587 | *[unisex=yes][female=yes][male=yes][shop=hairdresser] {
|
---|
588 | throwWarning: tr("{0} together with {1} and {2}. Remove {1} and {2}", "{0.tag}", "{1.tag}", "{2.tag}");
|
---|
589 | group: tr("suspicious tag combination");
|
---|
590 | fixRemove: "female";
|
---|
591 | fixRemove: "male";
|
---|
592 | }
|
---|
593 | *[female=yes][male=yes][!unisex][shop=hairdresser] {
|
---|
594 | throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
|
---|
595 | suggestAlternative: "unisex=yes";
|
---|
596 | group: tr("suspicious tag combination");
|
---|
597 | fixRemove: "female";
|
---|
598 | fixRemove: "male";
|
---|
599 | fixAdd: "unisex=yes";
|
---|
600 | }
|
---|
601 |
|
---|
602 | /* {1.key} without {2.tag} see #13138, #14468 */
|
---|
603 | way!:closed[water][natural!~/water|bay|strait/][water!=intermittent][amenity!=lavoir], /* water=intermittent is deprecated and has an own warning */
|
---|
604 | area:closed[water][natural!~/water|bay|strait/][water!=intermittent][amenity!=lavoir] {
|
---|
605 | throwWarning: tr("{0} without {1}", "{1.key}", "{2.tag}");
|
---|
606 | group: tr("missing tag");
|
---|
607 | }
|
---|
608 |
|
---|
609 | /* #13680 */
|
---|
610 | area[golf=bunker][natural=beach] {
|
---|
611 | throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
|
---|
612 | suggestAlternative: "natural=sand";
|
---|
613 | suggestAlternative: "surface=sand";
|
---|
614 | group: tr("suspicious tag combination");
|
---|
615 | }
|
---|
616 |
|
---|
617 | /* #13705 */
|
---|
618 | relation[type=multipolygon][building] > way {
|
---|
619 | set part_of_building_MP;
|
---|
620 | }
|
---|
621 | way["addr:housenumber"][!building][!"building:part"][!"demolished:building"][!note][!amenity][!leisure][!landuse][!man_made][!tourism][!barrier]!.part_of_building_MP {
|
---|
622 | /* don't exclude shop because a lot of real missing bulding tag cases have a shop tag. */
|
---|
623 | throwOther: tr("possibly missing {0} tag", "{1.key}");
|
---|
624 | group: tr("missing tag");
|
---|
625 | }
|
---|
626 |
|
---|
627 | /* see #8519, #11529, limited to motorways and trunks to avoid false positives for streets with lanes for non motorized traffic */
|
---|
628 | way[highway =~ /^(motorway|motorway_link|trunk|trunk_link)$/] {
|
---|
629 | set MotorwayTrunk;
|
---|
630 | }
|
---|
631 | way.MotorwayTrunk[lanes][turn:lanes ][tag(lanes)!=eval(count(split("|", tag("turn:lanes"))))],
|
---|
632 | way.MotorwayTrunk[lanes][change:lanes ][tag(lanes)!=eval(count(split("|", tag("change:lanes"))))],
|
---|
633 | way.MotorwayTrunk[lanes][maxspeed:lanes ][tag(lanes)!=eval(count(split("|", tag("maxspeed:lanes"))))],
|
---|
634 | way.MotorwayTrunk[lanes][minspeed:lanes ][tag(lanes)!=eval(count(split("|", tag("minspeed:lanes"))))],
|
---|
635 | way.MotorwayTrunk[lanes][destination:lanes ][tag(lanes)!=eval(count(split("|", tag("destination:lanes"))))],
|
---|
636 | way.MotorwayTrunk[lanes][destination:ref:lanes ][tag(lanes)!=eval(count(split("|", tag("destination:ref:lanes"))))],
|
---|
637 | way.MotorwayTrunk[lanes][destination:symbol:lanes][tag(lanes)!=eval(count(split("|", tag("destination:symbol:lanes"))))] {
|
---|
638 | throwWarning: tr("Different number of lanes in the keys {0} and {1}", "{1.key}", "{2.key}");
|
---|
639 | group: tr("suspicious tag combination");
|
---|
640 | }
|
---|
641 |
|
---|
642 | /* #14125, #14323, #18185 */
|
---|
643 | 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] {
|
---|
644 | throwWarning: tr("street with odd number of {0}, but without {1} and {2} or {3}", "{1.key}", "{2.key}", "{3.key}", "{4.key}");
|
---|
645 | group: tr("missing tag");
|
---|
646 | assertNoMatch: "way highway=primary lanes=2";
|
---|
647 | assertNoMatch: "way highway=primary lanes=3 lanes:backward=2";
|
---|
648 | assertNoMatch: "way highway=primary lanes=3 oneway=-1";
|
---|
649 | assertNoMatch: "way highway=primary lanes=4";
|
---|
650 | assertMatch: "way highway=primary lanes=3";
|
---|
651 | }
|
---|
652 |
|
---|
653 | /* #10932, #19609 */
|
---|
654 | way[highway][!lanes][/^.*:lanes$/][!source:lanes],
|
---|
655 | way[highway][!lanes][/^.*:lanes:(forward|backward|both_ways)$/],
|
---|
656 | way[highway][!lanes:both_ways][/^.*:lanes:both_ways$/] {
|
---|
657 | throwWarning: tr("{0} without {1}", "{2.key}", "{1.key}");
|
---|
658 | group: tr("missing tag");
|
---|
659 | assertMatch: "way highway=primary turn:lanes=left|right";
|
---|
660 | assertMatch: "way highway=primary turn:lanes:forward=left|right";
|
---|
661 | assertNoMatch: "way highway=primary turn:lanes=left|right lanes=2";
|
---|
662 | }
|
---|
663 | way[highway][!lanes:forward][/^.*:lanes:forward$/][!lanes:backward][!get(split(".", tag(lanes)/2), 1)=5],
|
---|
664 | way[highway][!lanes:backward][/^.*:lanes:backward$/][!lanes:forward][!get(split(".", tag(lanes)/2), 1)=5] {
|
---|
665 | throwOther: tr("{0} without {1}", "{2.key}", "{1.key}");
|
---|
666 | group: tr("missing tag");
|
---|
667 | assertMatch: "way highway=primary turn:lanes:forward=left|right lanes=2";
|
---|
668 | assertNoMatch: "way highway=primary turn:lanes:forward=left|right lanes:forward=2";
|
---|
669 | assertNoMatch: "way highway=primary turn:lanes:forward=left|right lanes=3";
|
---|
670 | }
|
---|
671 |
|
---|
672 | /* #15774 */
|
---|
673 | node[emergency=fire_hydrant][fire_hydrant:count][fire_hydrant:count!=1] {
|
---|
674 | throwOther: tr("{0} together with {1}. Tag each hydrant separately.", "{0.tag}", "{1.tag}");
|
---|
675 | }
|
---|
676 |
|
---|
677 | /* #12502 */
|
---|
678 | node[leisure=park][natural=tree] {
|
---|
679 | throwWarning: tr("{0} together with {1} on a node. Remove {0}.", "{0.tag}", "{1.tag}");
|
---|
680 | group: tr("suspicious tag combination");
|
---|
681 | fixRemove: "leisure";
|
---|
682 | }
|
---|
683 |
|
---|
684 | /* #17305 */
|
---|
685 | area[boundary=administrative][landuse=residential] {
|
---|
686 | throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
|
---|
687 | group: tr("suspicious tag combination");
|
---|
688 | }
|
---|
689 |
|
---|
690 | /* #17391 */
|
---|
691 | way[highway=pedestrian][width][width<3] {
|
---|
692 | throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
|
---|
693 | suggestAlternative: "highway=footway";
|
---|
694 | group: tr("suspicious tag combination");
|
---|
695 | fixAdd: "highway=footway";
|
---|
696 | assertMatch: "way highway=pedestrian width=0.8";
|
---|
697 | assertMatch: "way highway=pedestrian width=1";
|
---|
698 | assertNoMatch: "way highway=pedestrian width=3";
|
---|
699 | assertNoMatch: "way highway=pedestrian width=5.5";
|
---|
700 | }
|
---|
701 |
|
---|
702 | /* see #17623 */
|
---|
703 | way:areaStyle[highway][highway =~ /motorway|trunk|primary|secondary|tertiary|unclassified|residential|service$|living_street|pedestrian|track|path|footway|cycleway|bus_guideway|bridleway/][area!=yes] {
|
---|
704 | throwOther: tr("A linear object {0} without {1} has a tag indicating that it is an area.", "{1.tag}", "{3.tag}");
|
---|
705 | group: tr("suspicious tag combination");
|
---|
706 | }
|
---|
707 |
|
---|
708 | /* #17804 */
|
---|
709 | area[cemetery=sector][landuse=cemetery] {
|
---|
710 | throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
|
---|
711 | group: tr("suspicious tag combination");
|
---|
712 | }
|
---|
713 |
|
---|
714 | /* #17967 */
|
---|
715 | *[highway=cycleway][cycleway=track] {
|
---|
716 | throwWarning: tr("{0} together with {1}. Remove {1}.", "{0.tag}", "{1.tag}");
|
---|
717 | group: tr("suspicious tag combination");
|
---|
718 | fixRemove: "cycleway";
|
---|
719 | }
|
---|
720 |
|
---|
721 | /* #17973, #18183, #18331 */
|
---|
722 | way[highway=path ][foot][foot!=no ][foot!=use_sidepath ][!segregated][bicycle][bicycle!=no][bicycle!=use_sidepath][bicycle!=dismount]!.unpaved_surface,
|
---|
723 | way[highway=footway ][bicycle][bicycle!=no][bicycle!=use_sidepath][!segregated][bicycle!=dismount]!.unpaved_surface,
|
---|
724 | way[highway=cycleway][foot][foot!=no ][foot!=use_sidepath ][!segregated]!.unpaved_surface {
|
---|
725 | throwWarning: tr("Combined foot- and cycleway without {0}.", "{4.key}");
|
---|
726 | group: tr("missing tag");
|
---|
727 | }
|
---|
728 |
|
---|
729 | /* #17989 */
|
---|
730 | node[emergency_ward_entrance][emergency!=emergency_ward_entrance] {
|
---|
731 | throwWarning: tr("{0} without {1}", "{0.tag}", "{1.tag}");
|
---|
732 | group: tr("missing tag");
|
---|
733 | fixAdd: "emergency=emergency_ward_entrance";
|
---|
734 | }
|
---|
735 |
|
---|
736 | /* #18203 */
|
---|
737 | way[construction][construction!=yes][construction!=minor][highway][highway!=construction] {
|
---|
738 | throwWarning: tr("{0} together with {1}", "{3.tag}", "{0.tag}");
|
---|
739 | group: tr("suspicious tag combination");
|
---|
740 | }
|
---|
741 |
|
---|
742 | /* #18374 */
|
---|
743 | *[amenity=recycling][collection_times="24/7"][!opening_hours],
|
---|
744 | *[amenity=recycling][collection_times ][!opening_hours][collection_times=~/[a-z]-[A-Z].*[0-9]-[0-9]/] {
|
---|
745 | throwWarning: tr("{0} together with {1}. Probably {2} is meant.", "{1.key}", "{0.tag}", "{2.key}");
|
---|
746 | group: tr("suspicious tag combination");
|
---|
747 | fixChangeKey: "collection_times => opening_hours";
|
---|
748 | assertMatch: "node amenity=recycling collection_times=\"Mo-Fr 06:00-20:00\"";
|
---|
749 | assertNoMatch: "node amenity=recycling collection_times=\"Mo-Fr 15:00\"";
|
---|
750 | assertNoMatch: "node amenity=recycling collection_times=\"Mo 08:00-11:00\"";
|
---|
751 | assertNoMatch: "node amenity=recycling collection_times=\"Sa[2,4] 8:00-11:00\"";
|
---|
752 | }
|
---|
753 | *[amenity=recycling][collection_times="24/7"][opening_hours],
|
---|
754 | *[amenity=recycling][collection_times ][opening_hours][collection_times=~/[a-z]-[A-Z].*[0-9]-[0-9]/] {
|
---|
755 | throwWarning: tr("{0} together with {1}. Probably {2} is meant.", "{1.key}", "{0.tag}", "{2.key}");
|
---|
756 | group: tr("suspicious tag combination");
|
---|
757 | }
|
---|
758 |
|
---|
759 | /* #19018 */
|
---|
760 | way[highway][crossing][highway =~ /^(motorway|motorway_link|trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified|residential|service|living_street)$/] {
|
---|
761 | throwWarning: tr("{0} together with {1}. Should be used on a minor highway type or a node", "{1.key}", "{0.tag}");
|
---|
762 | group: tr("suspicious tag combination");
|
---|
763 | fixRemove: "crossing";
|
---|
764 | assertMatch: "way highway=trunk crossing=unmarked";
|
---|
765 | assertNoMatch: "way highway=construction construction=footway crossing=unmarked";
|
---|
766 | }
|
---|
767 |
|
---|
768 | /* #19066 */
|
---|
769 | *[amenity=recycling][!/^recycling:/][recycling_type!=centre] {
|
---|
770 | throwWarning: tr("{0} without {1}", "{0.tag}", "recycling:*");
|
---|
771 | group: tr("missing tag");
|
---|
772 | }
|
---|
773 | *[source:addr][!/^addr:/] {
|
---|
774 | throwWarning: tr("{0} without {1}", "{0.key}", "addr:*");
|
---|
775 | group: tr("missing tag");
|
---|
776 | assertMatch: "node source:addr=postman";
|
---|
777 | assertNoMatch: "node source:addr=postman addr:housenumber=42";
|
---|
778 | }
|
---|
779 | *[source:maxspeed][!/^maxspeed:?/] {
|
---|
780 | throwWarning: tr("{0} without {1} or {2}", "{0.key}", "maxspeed", "maxspeed:*");
|
---|
781 | group: tr("missing tag");
|
---|
782 | }
|
---|
783 |
|
---|
784 | /* #16898, tower vs. communications_tower, wiki suggests 100m as rough guideline, so we warn for < 75m */
|
---|
785 | *[man_made=communications_tower][height][height =~ /^((7[0-4]|[1-6]?[0-9])(\.[0-9]*)?( m)?|(2(4[0-5]|[0-3][0-9])|1?[0-9]?[0-9])((\.[0-9]*)?( ft|\')|\'(11|10|[0-9])(\.[0-9]*)?\"))$/] { /* 75m ~ 246ft ~ 246' */
|
---|
786 | throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
|
---|
787 | suggestAlternative: "man_made=tower + tower:type=communication + height";
|
---|
788 | group: tr("suspicious tag combination");
|
---|
789 | assertMatch: "node man_made=communications_tower height=58";
|
---|
790 | assertMatch: "node man_made=communications_tower height=\"74 m\"";
|
---|
791 | assertMatch: "node man_made=communications_tower height=0.8";
|
---|
792 | assertMatch: "node man_made=communications_tower height=245'";
|
---|
793 | assertMatch: "node man_made=communications_tower height=\"224.22 ft\"";
|
---|
794 | assertMatch: "node man_made=communications_tower height=231'10.22\"";
|
---|
795 | assertNoMatch: "node man_made=communications_tower height=\"75 m\"";
|
---|
796 | assertNoMatch: "node man_made=communications_tower height=75.72";
|
---|
797 | assertNoMatch: "node man_made=communications_tower height=\"328.22 ft\"";
|
---|
798 | assertNoMatch: "node man_made=communications_tower height=4358'8\"";
|
---|
799 | assertNoMatch: "node height=4358'";
|
---|
800 | }
|
---|
801 |
|
---|
802 | /* #17296, If the value of fixme is only an osm key, it is often a leftover from a time when the object didn't have this key. The fixme was forgotten to remove when the key was added. Or the value of fixme should be described better what exactly needs to be fixed. */
|
---|
803 | *[fixme][count(split(" ", tag("fixme"))) == 1][has_tag_key(tag("fixme"))],
|
---|
804 | *[FIXME][count(split(" ", tag("FIXME"))) == 1][has_tag_key(tag("FIXME"))] {
|
---|
805 | throwWarning: tr("{0} together with {1}. Is the fixme fixed?", "{0.tag}", "{0.value}");
|
---|
806 | group: tr("suspicious tag combination");
|
---|
807 | assertMatch: "way name=\"Florist Gump\" fixme=name";
|
---|
808 | assertMatch: "way name=\"Florist Gump\" FIXME=name";
|
---|
809 | assertNoMatch: "way fixme=name";
|
---|
810 | assertNoMatch: "way name=\"Florist Gump\"";
|
---|
811 | assertNoMatch: "way name=\"Florist Gump\" fixme=\"the name might have changed\"";
|
---|
812 | }
|
---|
813 |
|
---|
814 | /* #19094 */
|
---|
815 | way[highway][placement=transition][join_list("", uniq_list(tag_regex("^placement:.*$")))==transition],
|
---|
816 | way[highway][!placement][/^placement:.*$/][join_list("", uniq_list(tag_regex("^placement:.*$")))==transition] {
|
---|
817 | throwWarning: tr("Use {0} only as value of {1}", "transition", "placement");
|
---|
818 | set PlacementTransitionWarning;
|
---|
819 | fixAdd: "placement=transition";
|
---|
820 | fixRemove: "placement:forward";
|
---|
821 | fixRemove: "placement:backward";
|
---|
822 | fixRemove: "placement:both_ways";
|
---|
823 | assertMatch: "way highway=primary placement=transition placement:both_ways=transition";
|
---|
824 | assertMatch: "way highway=primary placement:backward=transition placement:forward=transition";
|
---|
825 | assertNoMatch: "way highway=primary placement:backward=middle_of:1 placement:forward=transition";
|
---|
826 | assertNoMatch: "way highway=primary placement=middle_of:1 placement:backward=transition placement:forward=transition";
|
---|
827 | }
|
---|
828 | way[highway][placement][/^placement:.*$/]!.PlacementTransitionWarning,
|
---|
829 | way[highway]["placement:forward"]["placement:backward"]!.PlacementTransitionWarning,
|
---|
830 | way[highway]["placement:forward"]["placement:both_ways"]!.PlacementTransitionWarning,
|
---|
831 | way[highway]["placement:backward"]["placement:both_ways"]!.PlacementTransitionWarning {
|
---|
832 | throwError: tr("{0} together with {1}", "{1.key}", "{2.key}");
|
---|
833 | group: tr("suspicious tag combination");
|
---|
834 | assertMatch: "way highway=primary placement=left_of:2 placement:forward=right_of:1";
|
---|
835 | assertNoMatch: "way highway=primary placement:forward=right_of:1";
|
---|
836 | assertNoMatch: "way highway=primary placement:forward=transition placement:both_ways=transition";
|
---|
837 | }
|
---|
838 |
|
---|
839 | /* #19742 */
|
---|
840 | node:righthandtraffic[highway=mini_roundabout][direction=clockwise] {
|
---|
841 | throwWarning: tr("{0} together with {1} at right-hand traffic", "{1.tag}", "{2.tag}");
|
---|
842 | group: tr("suspicious tag combination");
|
---|
843 | }
|
---|
844 | node!:righthandtraffic[highway=mini_roundabout][direction=anticlockwise] {
|
---|
845 | throwWarning: tr("{0} together with {1} at left-hand traffic", "{1.tag}", "{2.tag}");
|
---|
846 | group: tr("suspicious tag combination");
|
---|
847 | }
|
---|
848 |
|
---|
849 | /* #19603 */
|
---|
850 | way[footway][highway][footway=sidewalk ][highway!~/^(path|footway|cycleway|construction|proposed)$/] {
|
---|
851 | throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
|
---|
852 | group: tr("suspicious tag combination");
|
---|
853 | suggestAlternative: "sidewalk=left";
|
---|
854 | suggestAlternative: "sidewalk=right";
|
---|
855 | suggestAlternative: "sidewalk=both";
|
---|
856 | suggestAlternative: "sidewalk=separate";
|
---|
857 | }
|
---|
858 | way[footway][highway][footway!=sidewalk][highway!~/^(path|footway|cycleway|construction|proposed)$/] {
|
---|
859 | throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
|
---|
860 | group: tr("suspicious tag combination");
|
---|
861 | }
|
---|
862 | way[footway][!highway][!/:highway$/],
|
---|
863 | way[cycleway][!highway][!/:highway$/] {
|
---|
864 | throwWarning: tr("{0} without {1}", "{0.key}", "{1.key}");
|
---|
865 | group: tr("missing tag");
|
---|
866 | assertNoMatch: "way footway=sidewalk abandoned:highway=unclassified";
|
---|
867 | }
|
---|
868 |
|
---|
869 | /* #17498 */
|
---|
870 | way[bicycle][/^cycleway(:|$)/][!/^bicycle:/][bicycle=~/^(no|use_sidepath)$/][/^cycleway(:|$)/!~/^(no|none|separate)$/] {
|
---|
871 | throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
|
---|
872 | group: tr("suspicious tag combination");
|
---|
873 | assertMatch: "way bicycle=no cycleway=track";
|
---|
874 | assertMatch: "way bicycle=use_sidepath cycleway=lane";
|
---|
875 | assertMatch: "way bicycle=use_sidepath cycleway:left=lane";
|
---|
876 | assertNoMatch: "way bicycle=use_sidepath cycleway=no";
|
---|
877 | assertNoMatch: "way bicycle=use_sidepath bicycle:backward=yes cycleway:left=lane"; /* instead of :backward, could also be :forward or :conditional */
|
---|
878 | assertNoMatch: "way bicycle=no cycleway:right=no";
|
---|
879 | assertNoMatch: "way bicycle=use_sidepath cycleway:left=none";
|
---|
880 | assertNoMatch: "way highway=cycleway cycleway=separate";
|
---|
881 | assertNoMatch: "way highway=residential bicycle=use_sidepath";
|
---|
882 | }
|
---|
883 |
|
---|
884 | /* #19980 */
|
---|
885 | way[highway=living_street][maxspeed][maxspeed=~/mph/][get(split(" ", tag(maxspeed)), 0) > 15],
|
---|
886 | way[highway=living_street][maxspeed][maxspeed!~/mph/][get(split(" ", tag(maxspeed)), 0) > 20] {
|
---|
887 | throwWarning: tr("{0} together with {1}", "{0.tag}", "{1.tag}");
|
---|
888 | group: tr("suspicious tag combination");
|
---|
889 | assertNoMatch: "way highway=living_street";
|
---|
890 | assertNoMatch: "way highway=living_street maxspeed=20";
|
---|
891 | assertNoMatch: "way highway=living_street maxspeed=\"15 mph\"";
|
---|
892 | assertNoMatch: "way highway=living_street maxspeed=walk";
|
---|
893 | assertMatch: "way highway=living_street maxspeed=30";
|
---|
894 | assertMatch: "way highway=living_street maxspeed=\"20 mph\"";
|
---|
895 | }
|
---|