2 Feature: Import of address interpolations
3 Tests that interpolated addresses are added correctly
5 Scenario: Simple even two point interpolation
7 | osm_id | class | type | housenumber | geometry
8 | 1 | place | house | 2 | 1 1
9 | 2 | place | house | 6 | 1 1.001
11 | osm_id | class | type | housenumber | geometry
12 | 1 | place | houses | even | 1 1, 1 1.001
17 Then way 1 expands to housenumbers
18 | housenumber | centroid
21 Scenario: Simple even two point interpolation with zero beginning
23 | osm_id | class | type | housenumber | geometry
24 | 1 | place | house | 0 | 1 1
25 | 2 | place | house | 8 | 1 1.001
27 | osm_id | class | type | housenumber | geometry
28 | 1 | place | houses | even | 1 1, 1 1.001
33 Then way 1 expands to housenumbers
34 | housenumber | centroid
39 Scenario: Backwards even two point interpolation
41 | osm_id | class | type | housenumber | geometry
42 | 1 | place | house | 2 | 1 1
43 | 2 | place | house | 6 | 1 1.001
45 | osm_id | class | type | housenumber | geometry
46 | 1 | place | houses | even | 1 1.001, 1 1
51 Then way 1 expands to housenumbers
52 | housenumber | centroid
55 Scenario: Even two point interpolation with odd beginning
57 | osm_id | class | type | housenumber | geometry
58 | 1 | place | house | 11 | 1 1
59 | 2 | place | house | 16 | 1 1.001
61 | osm_id | class | type | housenumber | geometry
62 | 1 | place | houses | even | 1 1, 1 1.001
67 Then way 1 expands to housenumbers
68 | housenumber | centroid
72 Scenario: Even two point interpolation with odd end
74 | osm_id | class | type | housenumber | geometry
75 | 1 | place | house | 10 | 1 1
76 | 2 | place | house | 15 | 1 1.001
78 | osm_id | class | type | housenumber | geometry
79 | 1 | place | houses | even | 1 1, 1 1.001
84 Then way 1 expands to housenumbers
85 | housenumber | centroid
89 Scenario: Reverse even two point interpolation with odd beginning
91 | osm_id | class | type | housenumber | geometry
92 | 1 | place | house | 11 | 1 1
93 | 2 | place | house | 16 | 1 1.001
95 | osm_id | class | type | housenumber | geometry
96 | 1 | place | houses | even | 1 1.001, 1 1
101 Then way 1 expands to housenumbers
102 | housenumber | centroid
106 Scenario: Reverse even two point interpolation with odd end
107 Given the place nodes
108 | osm_id | class | type | housenumber | geometry
109 | 1 | place | house | 10 | 1 1
110 | 2 | place | house | 15 | 1 1.001
112 | osm_id | class | type | housenumber | geometry
113 | 1 | place | houses | even | 1 1.001, 1 1
118 Then way 1 expands to housenumbers
119 | housenumber | centroid
123 Scenario: Simple odd two point interpolation
124 Given the place nodes
125 | osm_id | class | type | housenumber | geometry
126 | 1 | place | house | 1 | 1 1
127 | 2 | place | house | 11 | 1 1.001
129 | osm_id | class | type | housenumber | geometry
130 | 1 | place | houses | odd | 1 1, 1 1.001
135 Then way 1 expands to housenumbers
136 | housenumber | centroid
142 Scenario: Odd two point interpolation with even beginning
143 Given the place nodes
144 | osm_id | class | type | housenumber | geometry
145 | 1 | place | house | 2 | 1 1
146 | 2 | place | house | 7 | 1 1.001
148 | osm_id | class | type | housenumber | geometry
149 | 1 | place | houses | odd | 1 1, 1 1.001
154 Then way 1 expands to housenumbers
155 | housenumber | centroid
159 Scenario: Simple all two point interpolation
160 Given the place nodes
161 | osm_id | class | type | housenumber | geometry
162 | 1 | place | house | 1 | 1 1
163 | 2 | place | house | 3 | 1 1.001
165 | osm_id | class | type | housenumber | geometry
166 | 1 | place | houses | all | 1 1, 1 1.001
171 Then way 1 expands to housenumbers
172 | housenumber | centroid
175 Scenario: Simple numbered two point interpolation
176 Given the place nodes
177 | osm_id | class | type | housenumber | geometry
178 | 1 | place | house | 3 | 1 1
179 | 2 | place | house | 9 | 1 1.001
181 | osm_id | class | type | housenumber | geometry
182 | 1 | place | houses | 3 | 1 1, 1 1.001
187 Then way 1 expands to housenumbers
188 | housenumber | centroid
191 Scenario: Even two point interpolation with intermediate empty node
192 Given the place nodes
193 | osm_id | class | type | housenumber | geometry
194 | 1 | place | house | 2 | 1 1
195 | 2 | place | house | 10 | 1.001 1.001
197 | osm_id | class | type | housenumber | geometry
198 | 1 | place | houses | even | 1 1, 1 1.001, 1.001 1.001
203 Then way 1 expands to housenumbers
204 | housenumber | centroid
210 Scenario: Even two point interpolation with intermediate duplicated empty node
211 Given the place nodes
212 | osm_id | class | type | housenumber | geometry
213 | 1 | place | house | 2 | 1 1
214 | 2 | place | house | 10 | 1.001 1.001
216 | osm_id | class | type | housenumber | geometry
217 | 1 | place | houses | even | 1 1, 1 1.001, 1.001 1.001
222 Then way 1 expands to housenumbers
223 | housenumber | centroid
228 Scenario: Simple even three point interpolation
229 Given the place nodes
230 | osm_id | class | type | housenumber | geometry
231 | 1 | place | house | 2 | 1 1
232 | 2 | place | house | 8 | 1.001 1.001
233 | 3 | place | house | 4 | 1 1.001
235 | osm_id | class | type | housenumber | geometry
236 | 1 | place | houses | even | 1 1, 1 1.001, 1.001 1.001
241 Then way 1 expands to housenumbers
242 | housenumber | centroid
245 Scenario: Even three point interpolation with odd center point
246 Given the place nodes
247 | osm_id | class | type | housenumber | geometry
248 | 1 | place | house | 2 | 1 1
249 | 2 | place | house | 8 | 1.001 1.001
250 | 3 | place | house | 7 | 1 1.001
252 | osm_id | class | type | housenumber | geometry
253 | 1 | place | houses | even | 1 1, 1 1.001, 1.001 1.001
258 Then way 1 expands to housenumbers
259 | housenumber | centroid
263 Scenario: Interpolation on self-intersecting way
264 Given the place nodes
265 | osm_id | class | type | housenumber | geometry
266 | 1 | place | house | 2 | 0 0
267 | 2 | place | house | 6 | 0 0.001
268 | 3 | place | house | 10 | 0 0.002
270 | osm_id | class | type | housenumber | geometry
271 | 1 | place | houses | even | 0 0, 0 0.001, 0 0.002, 0 0.001
276 Then way 1 expands to housenumbers
277 | housenumber | centroid
281 Scenario: Interpolation on self-intersecting way II
282 Given the place nodes
283 | osm_id | class | type | housenumber | geometry
284 | 1 | place | house | 2 | 0 0
285 | 2 | place | house | 6 | 0 0.001
287 | osm_id | class | type | housenumber | geometry
288 | 1 | place | houses | even | 0 0, 0 0.001, 0 0.002, 0 0.001
293 Then way 1 expands to housenumbers
294 | housenumber | centroid
298 Scenario: addr:street on interpolation way
299 Given the scene parallel-road
301 | osm_id | class | type | housenumber | geometry
302 | 1 | place | house | 2 | :n-middle-w
303 | 2 | place | house | 6 | :n-middle-e
304 | 3 | place | house | 12 | :n-middle-w
305 | 4 | place | house | 16 | :n-middle-e
307 | osm_id | class | type | housenumber | street | geometry
308 | 10 | place | houses | even | | :w-middle
309 | 11 | place | houses | even | Cloud Street | :w-middle
311 | osm_id | class | type | name | geometry
312 | 2 | highway | tertiary | 'name' : 'Sun Way' | :w-north
313 | 3 | highway | tertiary | 'name' : 'Cloud Street' | :w-south
316 | 10 | 1,100,101,102,2
317 | 11 | 3,200,201,202,4
319 Then table placex contains
320 | object | parent_place_id
327 And way 10 expands exactly to housenumbers 4
328 And way 11 expands exactly to housenumbers 14
330 Scenario: addr:street on housenumber way
331 Given the scene parallel-road
333 | osm_id | class | type | housenumber | street | geometry
334 | 1 | place | house | 2 | | :n-middle-w
335 | 2 | place | house | 6 | | :n-middle-e
336 | 3 | place | house | 12 | Cloud Street | :n-middle-w
337 | 4 | place | house | 16 | Cloud Street | :n-middle-e
339 | osm_id | class | type | housenumber | geometry
340 | 10 | place | houses | even | :w-middle
341 | 11 | place | houses | even | :w-middle
343 | osm_id | class | type | name | geometry
344 | 2 | highway | tertiary | 'name' : 'Sun Way' | :w-north
345 | 3 | highway | tertiary | 'name' : 'Cloud Street' | :w-south
348 | 10 | 1,100,101,102,2
349 | 11 | 3,200,201,202,4
351 Then table placex contains
352 | object | parent_place_id
359 And way 10 expands exactly to housenumbers 4
360 And way 11 expands exactly to housenumbers 14