2 Feature: Tag evaluation
3 Tests if tags are correctly imported into the place table
5 Scenario Outline: Name tags
8 n1 Thighway=yes,<nametag>=Foo
12 | N1 | '<nametag>' : 'Foo' |
49 Scenario: operator only for shops and amenities
52 n1 Thighway=yes,operator=Foo,name=null
53 n2 Tshop=grocery,operator=Foo
54 n3 Tamenity=hospital,operator=Foo
55 n4 Ttourism=hotel,operator=Foo
59 | N1 | 'name' : 'null' |
60 | N2 | 'operator' : 'Foo' |
61 | N3 | 'operator' : 'Foo' |
62 | N4 | 'operator' : 'Foo' |
64 Scenario Outline: Ignored name tags
67 n1 Thighway=yes,<nametag>=Foo,name=real
71 | N1 | 'name' : 'real' |
84 Scenario: Special character in name tag
87 n1 Thighway=yes,name:%20%de=Foo,name=real1
88 n2 Thighway=yes,name:%a%de=Foo,name=real2
89 n3 Thighway=yes,name:%9%de=Foo,name:\\=real3
93 | N1 | 'name: de' : 'Foo', 'name' : 'real1' |
94 | N2 | 'name: de' : 'Foo', 'name' : 'real2' |
95 | N3 | 'name: de' : 'Foo', 'name:\\\\' : 'real3' |
97 Scenario Outline: Included places
100 n1 T<key>=<value>,name=real
104 | N1 | 'name' : 'real' |
108 | emergency | phone |
109 | tourism | information |
110 | historic | castle |
111 | military | barracks |
113 | highway | residential |
114 | aerialway | station |
116 | boundary | administrative |
118 | leisure | playground |
119 | office | bookmaker |
122 | waterway | stream |
123 | landuse | cemetry |
125 | mountain_pass | yes |
127 Scenario Outline: Bridges and Tunnels take special name tags
128 When loading osm data
130 n1 Thighway=road,<key>=yes,name=Rd,<key>:name=My
131 n2 Thighway=road,<key>=yes,name=Rd
134 | object | type | name |
135 | N1:highway | road | 'name' : 'Rd' |
136 | N1:<key> | yes | 'name' : 'My' |
137 | N2:highway | road | 'name' : 'Rd' |
138 And place has no entry for N2:<key>
145 Scenario Outline: Excluded places
146 When loading osm data
148 n1 T<key>=<value>,name=real
149 n2 Thighway=motorway,name=To%20%Hell
151 Then place has no entry for N1
166 | highway | turning_circle |
167 | highway | mini_roundabout |
169 | highway | crossing |
171 | aerialway | pylon |
172 | man_made | survey_point |
173 | man_made | cutline |
181 | railway | level_crossing |
184 | waterway | riverbank |
186 Scenario Outline: Some tags only are included when named
187 When loading osm data
190 n2 T<key>=<value>,name=To%20%Hell
191 n3 T<key>=<value>,ref=123
193 Then place contains exactly
194 | object | class | type |
195 | N2 | <key> | <value> |
199 | landuse | residential |
201 | highway | traffic_signals |
202 | highway | service |
203 | highway | cycleway |
205 | highway | footway |
207 | highway | bridleway |
210 | highway | motorway_link |
211 | highway | primary_link |
212 | highway | trunk_link |
213 | highway | secondary_link |
214 | highway | tertiary_link |
216 | boundary | administrative |
217 | waterway | stream |
219 Scenario: Footways are not included if they are sidewalks
220 When loading osm data
222 n2 Thighway=footway,name=To%20%Hell,footway=sidewalk
223 n23 Thighway=footway,name=x
225 Then place has no entry for N2
227 Scenario: named junctions are included if there is no other tag
228 When loading osm data
231 n2 Thighway=secondary,junction=roundabout,name=To-Hell
232 n3 Tjunction=yes,name=Le%20%Croix
234 Then place has no entry for N1
235 And place has no entry for N2:junction
237 | object | class | type |
238 | N3 | junction | yes |
240 Scenario: Boundary with place tag
241 When loading osm data
247 w2 Tboundary=administrative,place=city,name=Foo Nn200,n201,n202,n203,n200
248 w4 Tboundary=administrative,place=island,name=Foo Nn200,n201,n202,n203,n200
249 w20 Tplace=city,name=ngng Nn200,n201,n202,n203,n200
250 w40 Tplace=city,boundary=statistical,name=BB Nn200,n201,n202,n203,n200
253 | object | class | extratags | type |
254 | W2 | boundary | 'place' : 'city' | administrative |
255 | W4:boundary | boundary | - | administrative |
256 | W4:place | place | - | island |
257 | W20 | place | - | city |
258 | W40:boundary | boundary | - | statistical |
259 | W40:place | place | - | city |
260 And place has no entry for W2:place
262 Scenario Outline: Tags that describe a house
263 When loading osm data
266 n999 Tamenity=prison,<key>=<value>
268 Then place contains exactly
269 | object | class | type |
270 | N100 | place | house |
271 | N999 | amenity | prison |
275 | addr:housename | My%20%Mansion |
276 | addr:housenumber | 456 |
277 | addr:conscriptionnumber | 4 |
278 | addr:streetnumber | 4568765 |
280 Scenario: Only named with no other interesting tag
281 When loading osm data
284 n2 Tlanduse=residential,name=important
285 n3 Tlanduse=residential,name=important,place=hamlet
288 | object | class | type |
289 | N2 | landuse | residential |
290 | N3 | place | hamlet |
291 And place has no entry for N1
292 And place has no entry for N3:landuse
294 Scenario Outline: Import of postal codes
295 When loading osm data
297 n10 Thighway=secondary,<key>=<value>
301 | object | class | type | postcode |
302 | N10 | highway | secondary | <value> |
303 | N11 | place | postcode | <value> |
304 And place has no entry for N10:place
308 | postal_code | 45736 |
310 | addr:postcode | 564 |
311 | tiger:zip_left | 00011 |
312 | tiger:zip_right | 09123 |
314 Scenario: Import of street and place
315 When loading osm data
317 n10 Tamenity=hospital,addr:street=Foo%20%St
318 n20 Tamenity=hospital,addr:place=Foo%20%Town
321 | object | class | type | street | addr_place |
322 | N10 | amenity | hospital | Foo St | None |
323 | N20 | amenity | hospital | - | Foo Town |
326 Scenario Outline: Import of country
327 When loading osm data
329 n10 Tplace=village,<key>=<value>
332 | object | class | type | country_code |
333 | N10 | place | village | <value> |
337 | country_code | us |
339 | is_in:country_code | __ |
340 | addr:country | .. |
341 | addr:country_code | cv |
343 Scenario Outline: Ignore country codes with wrong length
344 When loading osm data
346 n10 Tplace=village,country_code=<value>
349 | object | class | type | country_code |
350 | N10 | place | village | - |
360 Scenario: Import of house numbers
361 When loading osm data
363 n10 Tbuilding=yes,addr:housenumber=4b
364 n11 Tbuilding=yes,addr:conscriptionnumber=003
365 n12 Tbuilding=yes,addr:streetnumber=2345
366 n13 Tbuilding=yes,addr:conscriptionnumber=3,addr:streetnumber=111
369 | object | class | type | housenumber |
370 | N10 | building | yes | 4b |
371 | N11 | building | yes | 003 |
372 | N12 | building | yes | 2345 |
373 | N13 | building | yes | 3/111 |
375 Scenario: Import of address interpolations
376 When loading osm data
378 n10 Taddr:interpolation=odd
379 n11 Taddr:housenumber=10,addr:interpolation=odd
380 n12 Taddr:interpolation=odd,addr:housenumber=23
383 | object | class | type | housenumber |
384 | N10 | place | houses | odd |
385 | N11 | place | houses | odd |
386 | N12 | place | houses | odd |
388 Scenario: Shorten tiger:county tags
389 When loading osm data
391 n10 Tplace=village,tiger:county=Feebourgh%2c%%20%AL
392 n11 Tplace=village,addr:state=Alabama,tiger:county=Feebourgh%2c%%20%AL
393 n12 Tplace=village,tiger:county=Feebourgh
396 | object | class | type | isin |
397 | N10 | place | village | Feebourgh county |
398 | N11 | place | village | Alabama,Feebourgh county |
399 | N12 | place | village | Feebourgh county |
401 Scenario Outline: Import of address tags
402 When loading osm data
404 n10 Tplace=village,<key>=<value>
407 | object | class | type | isin |
408 | N10 | place | village | <value> |
412 | is_in:country | Xanadu |
413 | addr:suburb | hinein |
414 | addr:city | Sydney |
415 | addr:state | Jura |
417 Scenario: Import of isin tags with space
418 When loading osm data
420 n10 Tplace=village,is_in=Stockholm%2c%%20%Sweden
421 n11 Tplace=village,addr:county=le%20%havre
424 | object | class | type | isin |
425 | N10 | place | village | Stockholm, Sweden |
426 | N11 | place | village | le havre |
428 Scenario: Import of admin level
429 When loading osm data
431 n10 Tamenity=hospital,admin_level=3
432 n11 Tamenity=hospital,admin_level=b
433 n12 Tamenity=hospital
434 n13 Tamenity=hospital,admin_level=3.0
437 | object | class | type | admin_level |
438 | N10 | amenity | hospital | 3 |
439 | N11 | amenity | hospital | 100 |
440 | N12 | amenity | hospital | 100 |
441 | N13 | amenity | hospital | 3 |
443 Scenario Outline: Import of extra tags
444 When loading osm data
446 n10 Ttourism=hotel,<key>=foo
449 | object | class | type | extratags |
450 | N10 | tourism | hotel | '<key>' : 'foo' |
525 | name:etymology:wikidata |
528 When loading osm data
530 n10 Ttourism=hotel,building=yes
532 n12 Tbuilding=shed,addr:housenumber=1
533 n13 Tbuilding=yes,name=Das-Haus
534 n14 Tbuilding=yes,addr:postcode=12345
537 | object | class | type |
538 | N10 | tourism | hotel |
539 | N12 | building| yes |
540 | N13 | building| yes |
541 | N14 | building| yes |
542 And place has no entry for N10:building
543 And place has no entry for N11
545 Scenario: complete node entry
546 When loading osm data
548 n290393920 Taddr:city=Perpignan,addr:country=FR,addr:housenumber=43\,addr:postcode=66000,addr:street=Rue%20%Pierre%20%Constant%20%d`Ivry,source=cadastre-dgi-fr%20%source%20%:%20%Direction%20%Générale%20%des%20%Impôts%20%-%20%Cadastre%20%;%20%mise%20%à%20%jour%20%:2008
551 | object | class | type | housenumber |
552 | N290393920 | place | house| 43\ |