2 Feature: Parenting of objects
3 Tests that the correct parent is chosen
5 Scenario: Address inherits postcode from its street unless it has a postcode
6 Given the grid with origin DE
11 | osm | class | type | housenr |
12 | N1 | place | house | 4 |
14 | osm | class | type | housenr | postcode |
15 | N2 | place | house | 5 | 99999 |
17 | osm | class | type | name | postcode | geometry |
18 | W1 | highway | residential | galoo | 12345 | 10,11 |
21 | object | parent_place_id |
24 When sending search query "4 galoo"
26 | ID | osm | display_name |
27 | 0 | N1 | 4, galoo, 12345, Deutschland |
28 When sending search query "5 galoo"
30 | ID | osm | display_name |
31 | 0 | N2 | 5, galoo, 99999, Deutschland |
33 Scenario: Address without tags, closest street
40 | osm | class | type |
41 | N1 | place | house |
42 | N2 | place | house |
43 | N3 | place | house |
44 | N4 | place | house |
46 | osm | class | type | geometry |
47 | W1 | highway | residential | 10,11 |
48 | W2 | highway | residential | 20,21 |
51 | object | parent_place_id |
57 Scenario: Address without tags avoids unnamed streets
64 | osm | class | type |
65 | N1 | place | house |
66 | N2 | place | house |
67 | N3 | place | house |
68 | N4 | place | house |
70 | osm | class | type | geometry |
71 | W1 | highway | residential | 10,11 |
73 | osm | class | type | geometry |
74 | W2 | highway | residential | 20,21 |
77 | object | parent_place_id |
83 Scenario: addr:street tag parents to appropriately named street
90 | osm | class | type | street|
91 | N1 | place | house | south |
92 | N2 | place | house | north |
93 | N3 | place | house | south |
94 | N4 | place | house | north |
96 | osm | class | type | name | geometry |
97 | W1 | highway | residential | north | 10,11 |
98 | W2 | highway | residential | south | 20,21 |
101 | object | parent_place_id |
107 Scenario: addr:street tag parents to appropriately named street, locale names
114 | osm | class | type | street| addr+street:de |
115 | N1 | place | house | south | Süd |
116 | N2 | place | house | north | Nord |
117 | N3 | place | house | south | Süd |
118 | N4 | place | house | north | Nord |
120 | osm | class | type | name | geometry |
121 | W1 | highway | residential | Nord | 10,11 |
122 | W2 | highway | residential | Süd | 20,21 |
125 | object | parent_place_id |
131 Scenario: addr:street tag parents to appropriately named street with abbreviation
138 | osm | class | type | street |
139 | N1 | place | house | south st |
140 | N2 | place | house | north st |
141 | N3 | place | house | south st |
142 | N4 | place | house | north st |
144 | osm | class | type | name+name:en | geometry |
145 | W1 | highway | residential | north street | 10,11 |
146 | W2 | highway | residential | south street | 20,21 |
149 | object | parent_place_id |
155 Scenario: addr:street tag parents to next named street
162 | osm | class | type | street |
163 | N1 | place | house | abcdef |
164 | N2 | place | house | abcdef |
165 | N3 | place | house | abcdef |
166 | N4 | place | house | abcdef |
168 | osm | class | type | name | geometry |
169 | W1 | highway | residential | abcdef | 10,11 |
170 | W2 | highway | residential | abcdef | 20,21 |
173 | object | parent_place_id |
179 Scenario: addr:street tag without appropriately named street
186 | osm | class | type | street |
187 | N1 | place | house | abcdef |
188 | N3 | place | house | abcdef |
190 | osm | class | type | name | geometry |
191 | W1 | highway | residential | abcde | 10,11 |
192 | W2 | highway | residential | abcde | 20,21 |
195 | object | parent_place_id |
199 Scenario: addr:place address
205 | osm | class | type | addr_place |
206 | N1 | place | house | myhamlet |
208 | osm | class | type | name | geometry |
209 | N2 | place | hamlet | myhamlet | 2 |
210 | W1 | highway | residential | myhamlet | 10,11 |
213 | object | parent_place_id |
216 Scenario: addr:street is preferred over addr:place
222 | osm | class | type | addr_place | street |
223 | N1 | place | house | myhamlet | mystreet|
225 | osm | class | type | name | geometry |
226 | N2 | place | hamlet | myhamlet | 2 |
227 | W1 | highway | residential | mystreet | 10,11 |
230 | object | parent_place_id |
233 Scenario: Untagged address in simple associated street relation
240 | osm | class | type |
241 | N1 | place | house |
242 | N2 | place | house |
243 | N3 | place | house |
245 | osm | class | type | name | geometry |
246 | W1 | highway | residential | foo | 10,11 |
247 | W2 | highway | service | bar | 10,12 |
249 | id | members | tags+type |
250 | 1 | W1:street,N1,N2,N3 | associatedStreet |
253 | object | parent_place_id |
258 Scenario: Avoid unnamed streets in simple associated street relation
265 | osm | class | type |
266 | N1 | place | house |
267 | N2 | place | house |
268 | N3 | place | house |
270 | osm | class | type | geometry |
271 | W2 | highway | residential | 10,12 |
273 | osm | class | type | geometry |
274 | W1 | highway | residential | 10,11 |
276 | id | members | tags+type |
277 | 1 | N1,N2,N3,W2:street,W1:street | associatedStreet |
280 | object | parent_place_id |
285 Scenario: Associated street relation overrides addr:street
292 | osm | class | type | street |
293 | N1 | place | house | bar |
295 | osm | class | type | name | geometry |
296 | W1 | highway | residential | foo | 10,11 |
297 | W2 | highway | residential | bar | 20,21 |
299 | id | members | tags+type |
300 | 1 | W1:street,N1 | associatedStreet |
303 | object | parent_place_id |
306 Scenario: Building without tags, closest street from center point
312 | osm | class | type | geometry |
313 | W1 | building | yes | (1,2,3,4,1) |
314 | W2 | highway | primary | 10,11 |
315 | W3 | highway | residential | 10,12 |
318 | object | parent_place_id |
321 Scenario: Building with addr:street tags
327 | osm | class | type | street | geometry |
328 | W1 | building | yes | foo | (1,2,3,4,1) |
330 | osm | class | type | name | geometry |
331 | W2 | highway | primary | bar | 10,11 |
332 | W3 | highway | residential | foo | 10,12 |
335 | object | parent_place_id |
338 Scenario: Building with addr:place tags
344 | osm | class | type | name | geometry |
345 | N9 | place | village | bar | 9 |
346 | W2 | highway | primary | bar | 10,11 |
348 | osm | class | type | addr_place | geometry |
349 | W1 | building | yes | bar | (1,2,3,4,1) |
352 | object | parent_place_id |
355 Scenario: Building in associated street relation
361 | osm | class | type | geometry |
362 | W1 | building | yes | (1,2,3,4,1) |
364 | osm | class | type | name | geometry |
365 | W2 | highway | primary | bar | 10,11 |
366 | W3 | highway | residential | foo | 10,12 |
368 | id | members | tags+type |
369 | 1 | W1:house,W3:street | associatedStreet |
372 | object | parent_place_id |
375 Scenario: Building in associated street relation overrides addr:street
381 | osm | class | type | street | geometry |
382 | W1 | building | yes | foo | (1,2,3,4,1) |
384 | osm | class | type | name | geometry |
385 | W2 | highway | primary | bar | 10,11 |
386 | W3 | highway | residential | foo | 10,12 |
388 | id | members | tags+type |
389 | 1 | W1:house,W2:street | associatedStreet |
392 | object | parent_place_id |
395 Scenario: Wrong member in associated street relation is ignored
397 | 10 | | | | | | | 11 |
398 | | 1 | | 3 | 4 | | | |
399 | | | | 6 | 5 | | | |
401 | osm | class | type | geometry |
402 | N1 | place | house | 11 |
404 | osm | class | type | street | geometry |
405 | W1 | building | yes | foo | (3,4,5,6,3) |
407 | osm | class | type | name | geometry |
408 | W3 | highway | residential | foo | 10,11 |
410 | id | members | tags+type |
411 | 1 | N1:house,W1:street,W3:street | associatedStreet |
414 | object | parent_place_id |
417 Scenario: street member in associatedStreet relation can be a relation
425 | osm | class | type | housenr | geometry |
426 | N9 | place | house | 34 | 9 |
428 | osm | class | type | name | geometry |
429 | R14 | highway | pedestrian | Right St | (1,2,4,3,1) |
430 | W14 | highway | pedestrian | Left St | 5,6 |
432 | id | members | tags+type |
433 | 1 | N9:house,R14:street | associatedStreet |
436 | object | parent_place_id |
440 Scenario: Choose closest street in associatedStreet relation
445 | osm | class | type | housenr | geometry |
446 | N1 | place | house | 1 | 1 |
447 | N3 | place | house | 3 | 3 |
449 | osm | class | type | geometry |
450 | W100 | highway | residential | 10,11 |
451 | W101 | highway | residential | 11,12 |
453 | id | members | tags+type |
454 | 1 | N1:house,N3:house,W100:street,W101:street | associatedStreet |
457 | object | parent_place_id |
462 Scenario: POIs in building inherit address
464 | 10 | | | | | | 11 |
465 | | | 5 | 2 | 6 | | |
467 | 12 | | 8 | | 7 | | |
469 | osm | class | type |
470 | N1 | amenity | bank |
471 | N2 | shop | bakery |
472 | N3 | shop | supermarket|
474 | osm | class | type | street | housenr | geometry |
475 | W1 | building | yes | foo | 3 | (5,6,7,8,5) |
477 | osm | class | type | name | geometry |
478 | W2 | highway | primary | bar | 10,11 |
479 | W3 | highway | residential | foo | 10,12 |
482 | object | parent_place_id | housenumber |
487 When sending geocodejson search query "3, foo" with address
492 Scenario: POIs don't inherit from streets
498 | osm | class | type |
499 | N1 | amenity | bank |
501 | osm | class | type | name | street | housenr | geometry |
502 | W1 | highway | path | bar | foo | 3 | (5,6,7,8,5) |
504 | osm | class | type | name | geometry |
505 | W3 | highway | residential | foo | 10,11 |
508 | object | parent_place_id | housenumber |
511 Scenario: POIs with own address do not inherit building address
513 | 10 | | | | | | 11 |
514 | | | 6 | 2 | 7 | | |
515 | | | 3 | 1 | | 5 | 4 |
516 | 12 | | 9 | | 8 | | |
518 | osm | class | type | street |
519 | N1 | amenity | bank | bar |
521 | osm | class | type | housenr |
522 | N2 | shop | bakery | 4 |
524 | osm | class | type | addr_place |
525 | N3 | shop | supermarket| nowhere |
527 | osm | class | type | name |
528 | N4 | place | isolated_dwelling | theplace |
529 | N5 | place | isolated_dwelling | nowhere |
531 | osm | class | type | addr_place | housenr | geometry |
532 | W1 | building | yes | theplace | 3 | (6,7,8,9,6) |
534 | osm | class | type | name | geometry |
535 | W2 | highway | primary | bar | 10,11 |
536 | W3 | highway | residential | foo | 10,12 |
539 | object | parent_place_id | housenumber |
545 Scenario: POIs parent a road if they are attached to it
551 | osm | class | type |
552 | N1 | highway | bus_stop |
554 | osm | class | type | name | geometry |
555 | W1 | highway | secondary | North St | 10,11 |
556 | W2 | highway | unclassified | South St | 20,1,21 |
563 | object | parent_place_id |
566 Scenario: POIs do not parent non-roads they are attached to
568 | 10 | | 1 | | 11 | | 30 |
569 | 14 | | | | 15 | | |
570 | 13 | | 2 | | 12 | | 31 |
572 | osm | class | type | street |
573 | N1 | highway | bus_stop | North St |
574 | N2 | highway | bus_stop | South St |
576 | osm | class | type | name | geometry |
577 | W1 | landuse | residential | North St | (14,15,12,2,13,14) |
578 | W2 | waterway| river | South St | 10,1,11 |
579 | W3 | highway | residential | foo | 30,31 |
582 | 1 | 10,11,12,2,13,10 |
586 | object | parent_place_id |
590 Scenario: POIs on building outlines inherit associated street relation
596 | osm | class | type | geometry |
597 | N1 | place | house | 1 |
598 | W1 | building | yes | (5,1,6,7,8,5)|
600 | osm | class | type | name | geometry |
601 | W2 | highway | primary | bar | 10,11 |
602 | W3 | highway | residential | foo | 10,12 |
604 | id | members | tags+type |
605 | 1 | W1:house,W3:street | associatedStreet |
611 | object | parent_place_id |
615 Scenario: Full names should be preferably matched for nearest road
622 | osm | class | type | name+name | geometry |
623 | W1 | highway | residential | Via Cavassico superiore | 1, 2 |
624 | W3 | highway | residential | Via Cavassico superiore | 2, 5 |
625 | W2 | highway | primary | Via Frazione Cavassico | 3, 4 |
627 | osm | class | type | addr+street |
628 | N10 | shop | yes | Via Cavassico superiore |
631 | object | parent_place_id |
634 Scenario: place=square may be parented via addr:place
640 | osm | class | type | name+name | geometry |
641 | W2 | place | square | Foo pl | (5, 6, 7, 8, 5) |
643 | osm | class | type | name+name | housenr | addr_place | geometry |
644 | N10 | shop | grocery | le shop | 5 | Foo pl | 9 |
647 | object | rank_address |
650 | object | parent_place_id |