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
41 Scenario: addr:street added to housenumbers
42 Given the scene parallel-road
44 | osm_id | class | type | housenumber | geometry
45 | 1 | place | house | 2 | :n-middle-w
46 | 2 | place | house | 6 | :n-middle-e
48 | osm_id | class | type | housenumber | geometry
49 | 10 | place | houses | even | :w-middle
51 | osm_id | class | type | name | geometry
52 | 2 | highway | unclassified | 'name' : 'Sun Way' | :w-north
53 | 3 | highway | unclassified | 'name' : 'Cloud Street' | :w-south
56 | 10 | 1,100,101,102,2
58 Then table placex contains
59 | object | parent_place_id
62 And table location_property_osmline contains
63 | object | parent_place_id | startnumber | endnumber
65 When updating place nodes
66 | osm_id | class | type | street | housenumber | geometry
67 | 1 | place | house | Cloud Street| 2 | :n-middle-w
68 | 2 | place | house | Cloud Street| 6 | :n-middle-e
69 Then table placex contains
70 | object | parent_place_id
73 And table location_property_osmline contains
74 | object | parent_place_id | startnumber | endnumber
78 Scenario: interpolation tag removed
79 Given the scene parallel-road
81 | osm_id | class | type | housenumber | geometry
82 | 1 | place | house | 2 | :n-middle-w
83 | 2 | place | house | 6 | :n-middle-e
85 | osm_id | class | type | housenumber | geometry
86 | 10 | place | houses | even | :w-middle
88 | osm_id | class | type | name | geometry
89 | 2 | highway | unclassified | 'name' : 'Sun Way' | :w-north
90 | 3 | highway | unclassified | 'name' : 'Cloud Street' | :w-south
93 | 10 | 1,100,101,102,2
95 Then table placex contains
96 | object | parent_place_id
99 And table location_property_osmline contains
100 | object | parent_place_id | startnumber | endnumber
102 When marking for delete W10
103 Then table location_property_osmline has no entry for W10
104 And table placex contains
105 | object | parent_place_id
110 Scenario: referenced road added
111 Given the scene parallel-road
113 | osm_id | class | type | housenumber | geometry
114 | 1 | place | house | 2 | :n-middle-w
115 | 2 | place | house | 6 | :n-middle-e
117 | osm_id | class | type | housenumber | street | geometry
118 | 10 | place | houses | even | Cloud Street| :w-middle
120 | osm_id | class | type | name | geometry
121 | 2 | highway | unclassified | 'name' : 'Sun Way' | :w-north
124 | 10 | 1,100,101,102,2
126 Then table placex contains
127 | object | parent_place_id
130 And table location_property_osmline contains
131 | object | parent_place_id | startnumber | endnumber
133 When updating place ways
134 | osm_id | class | type | name | geometry
135 | 3 | highway | unclassified | 'name' : 'Cloud Street' | :w-south
136 Then table placex contains
137 | object | parent_place_id
140 And table location_property_osmline contains
141 | object | parent_place_id | startnumber | endnumber
145 Scenario: referenced road deleted
146 Given the scene parallel-road
148 | osm_id | class | type | housenumber | geometry
149 | 1 | place | house | 2 | :n-middle-w
150 | 2 | place | house | 6 | :n-middle-e
152 | osm_id | class | type | housenumber | street | geometry
153 | 10 | place | houses | even | Cloud Street| :w-middle
155 | osm_id | class | type | name | geometry
156 | 2 | highway | unclassified | 'name' : 'Sun Way' | :w-north
157 | 3 | highway | unclassified | 'name' : 'Cloud Street' | :w-south
160 | 10 | 1,100,101,102,2
162 Then table placex contains
163 | object | parent_place_id
166 And table location_property_osmline contains
167 | object | parent_place_id | startnumber | endnumber
169 When marking for delete W3
170 Then table placex contains
171 | object | parent_place_id
174 And table location_property_osmline contains
175 | object | parent_place_id | startnumber | endnumber