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
90 n4 Thighway=yes,name:%9%de=Foo,name=rea\l3
94 | N1 | 'name: de' : 'Foo', 'name' : 'real1' |
95 | N2 | 'name: de' : 'Foo', 'name' : 'real2' |
96 | N3 | 'name: de' : 'Foo', 'name:\\\\' : 'real3' |
97 | N4 | 'name: de' : 'Foo', 'name' : 'rea\\l3' |
99 Scenario Outline: Included places
100 When loading osm data
102 n1 T<key>=<value>,name=real
106 | N1 | 'name' : 'real' |
110 | emergency | phone |
111 | tourism | information |
112 | historic | castle |
113 | military | barracks |
115 | highway | residential |
116 | aerialway | station |
118 | boundary | administrative |
120 | leisure | playground |
121 | office | bookmaker |
124 | waterway | stream |
125 | landuse | cemetry |
127 | mountain_pass | yes |
129 Scenario Outline: Bridges and Tunnels take special name tags
130 When loading osm data
132 n1 Thighway=road,<key>=yes,name=Rd,<key>:name=My
133 n2 Thighway=road,<key>=yes,name=Rd
136 | object | type | name |
137 | N1:highway | road | 'name' : 'Rd' |
138 | N1:<key> | yes | 'name' : 'My' |
139 | N2:highway | road | 'name' : 'Rd' |
140 And place has no entry for N2:<key>
147 Scenario Outline: Excluded places
148 When loading osm data
150 n1 T<key>=<value>,name=real
151 n2 Thighway=motorway,name=To%20%Hell
153 Then place has no entry for N1
168 | highway | turning_circle |
169 | highway | mini_roundabout |
171 | highway | crossing |
173 | aerialway | pylon |
174 | man_made | survey_point |
175 | man_made | cutline |
183 | railway | level_crossing |
186 | waterway | riverbank |
188 Scenario Outline: Some tags only are included when named
189 When loading osm data
192 n2 T<key>=<value>,name=To%20%Hell
193 n3 T<key>=<value>,ref=123
195 Then place contains exactly
196 | object | class | type |
197 | N2 | <key> | <value> |
201 | landuse | residential |
203 | highway | traffic_signals |
204 | highway | service |
205 | highway | cycleway |
207 | highway | footway |
209 | highway | bridleway |
212 | highway | motorway_link |
213 | highway | primary_link |
214 | highway | trunk_link |
215 | highway | secondary_link |
216 | highway | tertiary_link |
218 | boundary | administrative |
219 | waterway | stream |
221 Scenario: Footways are not included if they are sidewalks
222 When loading osm data
224 n2 Thighway=footway,name=To%20%Hell,footway=sidewalk
225 n23 Thighway=footway,name=x
227 Then place has no entry for N2
229 Scenario: named junctions are included if there is no other tag
230 When loading osm data
233 n2 Thighway=secondary,junction=roundabout,name=To-Hell
234 n3 Tjunction=yes,name=Le%20%Croix
236 Then place has no entry for N1
237 And place has no entry for N2:junction
239 | object | class | type |
240 | N3 | junction | yes |
242 Scenario: Boundary with place tag
243 When loading osm data
249 w2 Tboundary=administrative,place=city,name=Foo Nn200,n201,n202,n203,n200
250 w4 Tboundary=administrative,place=island,name=Foo Nn200,n201,n202,n203,n200
251 w20 Tplace=city,name=ngng Nn200,n201,n202,n203,n200
252 w40 Tplace=city,boundary=statistical,name=BB Nn200,n201,n202,n203,n200
255 | object | class | extratags | type |
256 | W2 | boundary | 'place' : 'city' | administrative |
257 | W4:boundary | boundary | - | administrative |
258 | W4:place | place | - | island |
259 | W20 | place | - | city |
260 | W40:boundary | boundary | - | statistical |
261 | W40:place | place | - | city |
262 And place has no entry for W2:place
264 Scenario Outline: Tags that describe a house
265 When loading osm data
268 n999 Tamenity=prison,<key>=<value>
270 Then place contains exactly
271 | object | class | type |
272 | N100 | place | house |
273 | N999 | amenity | prison |
277 | addr:housename | My%20%Mansion |
278 | addr:housenumber | 456 |
279 | addr:conscriptionnumber | 4 |
280 | addr:streetnumber | 4568765 |
282 Scenario: Only named with no other interesting tag
283 When loading osm data
286 n2 Tlanduse=residential,name=important
287 n3 Tlanduse=residential,name=important,place=hamlet
290 | object | class | type |
291 | N2 | landuse | residential |
292 | N3 | place | hamlet |
293 And place has no entry for N1
294 And place has no entry for N3:landuse
296 Scenario Outline: Import of postal codes
297 When loading osm data
299 n10 Thighway=secondary,<key>=<value>
303 | object | class | type | postcode |
304 | N10 | highway | secondary | <value> |
305 | N11 | place | postcode | <value> |
306 And place has no entry for N10:place
310 | postal_code | 45736 |
312 | addr:postcode | 564 |
313 | tiger:zip_left | 00011 |
314 | tiger:zip_right | 09123 |
316 Scenario: Import of street and place
317 When loading osm data
319 n10 Tamenity=hospital,addr:street=Foo%20%St
320 n20 Tamenity=hospital,addr:place=Foo%20%Town
323 | object | class | type | street | addr_place |
324 | N10 | amenity | hospital | Foo St | None |
325 | N20 | amenity | hospital | - | Foo Town |
328 Scenario Outline: Import of country
329 When loading osm data
331 n10 Tplace=village,<key>=<value>
334 | object | class | type | country_code |
335 | N10 | place | village | <value> |
339 | country_code | us |
341 | is_in:country_code | __ |
342 | addr:country | .. |
343 | addr:country_code | cv |
345 Scenario Outline: Ignore country codes with wrong length
346 When loading osm data
348 n10 Tplace=village,country_code=<value>
351 | object | class | type | country_code |
352 | N10 | place | village | - |
362 Scenario: Import of house numbers
363 When loading osm data
365 n10 Tbuilding=yes,addr:housenumber=4b
366 n11 Tbuilding=yes,addr:conscriptionnumber=003
367 n12 Tbuilding=yes,addr:streetnumber=2345
368 n13 Tbuilding=yes,addr:conscriptionnumber=3,addr:streetnumber=111
371 | object | class | type | housenumber |
372 | N10 | building | yes | 4b |
373 | N11 | building | yes | 003 |
374 | N12 | building | yes | 2345 |
375 | N13 | building | yes | 3/111 |
377 Scenario: Import of address interpolations
378 When loading osm data
380 n10 Taddr:interpolation=odd
381 n11 Taddr:housenumber=10,addr:interpolation=odd
382 n12 Taddr:interpolation=odd,addr:housenumber=23
385 | object | class | type | housenumber |
386 | N10 | place | houses | odd |
387 | N11 | place | houses | odd |
388 | N12 | place | houses | odd |
390 Scenario: Shorten tiger:county tags
391 When loading osm data
393 n10 Tplace=village,tiger:county=Feebourgh%2c%%20%AL
394 n11 Tplace=village,addr:state=Alabama,tiger:county=Feebourgh%2c%%20%AL
395 n12 Tplace=village,tiger:county=Feebourgh
398 | object | class | type | isin |
399 | N10 | place | village | Feebourgh county |
400 | N11 | place | village | Alabama,Feebourgh county |
401 | N12 | place | village | Feebourgh county |
403 Scenario Outline: Import of address tags
404 When loading osm data
406 n10 Tplace=village,<key>=<value>
409 | object | class | type | isin |
410 | N10 | place | village | <value> |
414 | is_in:country | Xanadu |
415 | addr:suburb | hinein |
416 | addr:city | Sydney |
417 | addr:state | Jura |
419 Scenario: Import of isin tags with space
420 When loading osm data
422 n10 Tplace=village,is_in=Stockholm%2c%%20%Sweden
423 n11 Tplace=village,addr:county=le%20%havre
426 | object | class | type | isin |
427 | N10 | place | village | Stockholm, Sweden |
428 | N11 | place | village | le havre |
430 Scenario: Import of admin level
431 When loading osm data
433 n10 Tamenity=hospital,admin_level=3
434 n11 Tamenity=hospital,admin_level=b
435 n12 Tamenity=hospital
436 n13 Tamenity=hospital,admin_level=3.0
439 | object | class | type | admin_level |
440 | N10 | amenity | hospital | 3 |
441 | N11 | amenity | hospital | 100 |
442 | N12 | amenity | hospital | 100 |
443 | N13 | amenity | hospital | 3 |
445 Scenario Outline: Import of extra tags
446 When loading osm data
448 n10 Ttourism=hotel,<key>=foo
451 | object | class | type | extratags |
452 | N10 | tourism | hotel | '<key>' : 'foo' |
527 | name:etymology:wikidata |
530 When loading osm data
532 n10 Ttourism=hotel,building=yes
534 n12 Tbuilding=shed,addr:housenumber=1
535 n13 Tbuilding=yes,name=Das-Haus
536 n14 Tbuilding=yes,addr:postcode=12345
539 | object | class | type |
540 | N10 | tourism | hotel |
541 | N12 | building| yes |
542 | N13 | building| yes |
543 | N14 | building| yes |
544 And place has no entry for N10:building
545 And place has no entry for N11
547 Scenario: complete node entry
548 When loading osm data
550 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
553 | object | class | type | housenumber |
554 | N290393920 | place | house| 43\ |