2 Feature: Update of address interpolations
3 Test the interpolated address are updated correctly
5 Scenario: addr:street added to interpolation
6 Given the scene parallel-road
8 | osm_id | class | type | housenumber | geometry
9 | 1 | place | house | 2 | :n-middle-w
10 | 2 | place | house | 6 | :n-middle-e
12 | osm_id | class | type | housenumber | geometry
13 | 10 | place | houses | even | :w-middle
15 | osm_id | class | type | name | geometry
16 | 2 | highway | unclassified | 'name' : 'Sun Way' | :w-north
17 | 3 | highway | unclassified | 'name' : 'Cloud Street' | :w-south
20 | 10 | 1,100,101,102,2
22 Then table placex contains
23 | object | parent_place_id
26 And table location_property_osmline contains
27 | object | parent_place_id | startnumber | endnumber
29 When updating place ways
30 | osm_id | class | type | housenumber | street | geometry
31 | 10 | place | houses | even | Cloud Street | :w-middle
32 Then table placex contains
33 | object | parent_place_id
36 And table location_property_osmline contains
37 | object | parent_place_id | startnumber | endnumber
40 Scenario: addr:street added to housenumbers
41 Given the scene parallel-road
43 | osm_id | class | type | housenumber | geometry
44 | 1 | place | house | 2 | :n-middle-w
45 | 2 | place | house | 6 | :n-middle-e
47 | osm_id | class | type | housenumber | geometry
48 | 10 | place | houses | even | :w-middle
50 | osm_id | class | type | name | geometry
51 | 2 | highway | unclassified | 'name' : 'Sun Way' | :w-north
52 | 3 | highway | unclassified | 'name' : 'Cloud Street' | :w-south
55 | 10 | 1,100,101,102,2
57 Then table placex contains
58 | object | parent_place_id
61 And table location_property_osmline contains
62 | object | parent_place_id | startnumber | endnumber
64 When updating place nodes
65 | osm_id | class | type | street | housenumber | geometry
66 | 1 | place | house | Cloud Street| 2 | :n-middle-w
67 | 2 | place | house | Cloud Street| 6 | :n-middle-e
68 Then table placex contains
69 | object | parent_place_id
72 And table location_property_osmline contains
73 | object | parent_place_id | startnumber | endnumber
77 Scenario: interpolation tag removed
78 Given the scene parallel-road
80 | osm_id | class | type | housenumber | geometry
81 | 1 | place | house | 2 | :n-middle-w
82 | 2 | place | house | 6 | :n-middle-e
84 | osm_id | class | type | housenumber | geometry
85 | 10 | place | houses | even | :w-middle
87 | osm_id | class | type | name | geometry
88 | 2 | highway | unclassified | 'name' : 'Sun Way' | :w-north
89 | 3 | highway | unclassified | 'name' : 'Cloud Street' | :w-south
92 | 10 | 1,100,101,102,2
94 Then table placex contains
95 | object | parent_place_id
98 And table location_property_osmline contains
99 | object | parent_place_id | startnumber | endnumber
101 When marking for delete W10
102 Then table location_property_osmline has no entry for W10
103 And table placex contains
104 | object | parent_place_id
109 Scenario: referenced road added
110 Given the scene parallel-road
112 | osm_id | class | type | housenumber | geometry
113 | 1 | place | house | 2 | :n-middle-w
114 | 2 | place | house | 6 | :n-middle-e
116 | osm_id | class | type | housenumber | street | geometry
117 | 10 | place | houses | even | Cloud Street| :w-middle
119 | osm_id | class | type | name | geometry
120 | 2 | highway | unclassified | 'name' : 'Sun Way' | :w-north
123 | 10 | 1,100,101,102,2
125 Then table placex contains
126 | object | parent_place_id
129 And table location_property_osmline contains
130 | object | parent_place_id | startnumber | endnumber
132 When updating place ways
133 | osm_id | class | type | name | geometry
134 | 3 | highway | unclassified | 'name' : 'Cloud Street' | :w-south
135 Then table placex contains
136 | object | parent_place_id
139 And table location_property_osmline contains
140 | object | parent_place_id | startnumber | endnumber
144 Scenario: referenced road deleted
145 Given the scene parallel-road
147 | osm_id | class | type | housenumber | geometry
148 | 1 | place | house | 2 | :n-middle-w
149 | 2 | place | house | 6 | :n-middle-e
151 | osm_id | class | type | housenumber | street | geometry
152 | 10 | place | houses | even | Cloud Street| :w-middle
154 | osm_id | class | type | name | geometry
155 | 2 | highway | unclassified | 'name' : 'Sun Way' | :w-north
156 | 3 | highway | unclassified | 'name' : 'Cloud Street' | :w-south
159 | 10 | 1,100,101,102,2
161 Then table placex contains
162 | object | parent_place_id
165 And table location_property_osmline contains
166 | object | parent_place_id | startnumber | endnumber
168 When marking for delete W3
169 Then table placex contains
170 | object | parent_place_id
173 And table location_property_osmline contains
174 | object | parent_place_id | startnumber | endnumber