]> git.openstreetmap.org Git - nominatim.git/blob - test/bdd/db/update/parenting.feature
force update of surrounding houses when street name changes
[nominatim.git] / test / bdd / db / update / parenting.feature
1 @DB
2 Feature: Update parenting of objects
3
4     Scenario: POI inside building inherits addr:street change
5         Given the scene building-on-street-corner
6         And the named places
7          | osm | class   | type       | geometry |
8          | N1  | amenity | bank       | :n-inner |
9          | N2  | shop    | bakery     | :n-edge-NS |
10          | N3  | shop    | supermarket| :n-edge-WE |
11         And the places
12          | osm | class    | type | street  | housenr | geometry |
13          | W1  | building | yes  | nowhere | 3       | :w-building |
14         And the places
15          | osm | class    | type        | name | geometry |
16          | W2  | highway  | primary     | bar  | :w-WE |
17          | W3  | highway  | residential | foo  | :w-NS |
18         When importing
19         Then placex contains
20          | object | parent_place_id | housenumber |
21          | W1     | W2              | 3 |
22          | N1     | W3              | 3 |
23          | N2     | W3              | 3 |
24          | N3     | W2              | 3 |
25         When updating places
26          | osm | class    | type | street | addr_place | housenr | geometry    |
27          | W1  | building | yes  | foo    | nowhere    | 3       | :w-building |
28         And updating places
29          | osm | class   | type       | name | geometry |
30          | N3  | shop    | supermarket| well | :n-edge-WE |
31         Then placex contains
32          | object | parent_place_id | housenumber |
33          | W1     | W3              | 3 |
34          | N1     | W3              | 3 |
35          | N2     | W3              | 3 |
36          | N3     | W3              | 3 |
37
38     Scenario: Housenumber is reparented when street gets name matching addr:street
39         Given the grid
40          | 1 |    |   | 2 |
41          |   | 10 |   |   |
42          |   |    |   |   |
43          | 3 |    |   | 4 |
44         And the places
45          | osm | class   | type        | name     | geometry |
46          | W1  | highway | residential | A street | 1,2      |
47          | W2  | highway | residential | B street | 3,4      |
48         And the places
49          | osm | class    | type | housenr | street   | geometry |
50          | N1  | building | yes  | 3       | X street | 10       |
51         When importing
52         Then placex contains
53          | object | parent_place_id |
54          | N1     | W1              |
55         When updating places
56          | osm | class   | type        | name     | geometry |
57          | W2  | highway | residential | X street | 3,4      |
58         Then placex contains
59          | object | parent_place_id |
60          | N1     | W2              |