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 node 1 expands to housenumbers
18 | housenumber | centroid
21 And node 2 expands to housenumbers
22 | housenumber | centroid
25 Scenario: Simple even two point interpolation with zero beginning
27 | osm_id | class | type | housenumber | geometry
28 | 1 | place | house | 0 | 1 1
29 | 2 | place | house | 8 | 1 1.001
31 | osm_id | class | type | housenumber | geometry
32 | 1 | place | houses | even | 1 1, 1 1.001
37 Then node 1 expands to housenumbers
38 | housenumber | centroid
43 And node 2 expands to housenumbers
44 | housenumber | centroid
47 Scenario: Backwards even two point interpolation
49 | osm_id | class | type | housenumber | geometry
50 | 1 | place | house | 2 | 1 1
51 | 2 | place | house | 6 | 1 1.001
53 | osm_id | class | type | housenumber | geometry
54 | 1 | place | houses | even | 1 1.001, 1 1
59 Then node 1 expands to housenumbers
60 | housenumber | centroid
62 And node 2 expands to housenumbers
63 | housenumber | centroid
67 Scenario: Even two point interpolation with odd beginning
69 | osm_id | class | type | housenumber | geometry
70 | 1 | place | house | 11 | 1 1
71 | 2 | place | house | 16 | 1 1.001
73 | osm_id | class | type | housenumber | geometry
74 | 1 | place | houses | even | 1 1, 1 1.001
79 Then node 1 expands to housenumbers
80 | housenumber | centroid
84 And node 2 expands to housenumbers
85 | housenumber | centroid
88 Scenario: Even two point interpolation with odd end
90 | osm_id | class | type | housenumber | geometry
91 | 1 | place | house | 10 | 1 1
92 | 2 | place | house | 15 | 1 1.001
94 | osm_id | class | type | housenumber | geometry
95 | 1 | place | houses | even | 1 1, 1 1.001
100 Then node 1 expands to housenumbers
101 | housenumber | centroid
105 And node 2 expands to housenumbers
106 | housenumber | centroid
109 Scenario: Reverse even two point interpolation with odd beginning
110 Given the place nodes
111 | osm_id | class | type | housenumber | geometry
112 | 1 | place | house | 11 | 1 1
113 | 2 | place | house | 16 | 1 1.001
115 | osm_id | class | type | housenumber | geometry
116 | 1 | place | houses | even | 1 1.001, 1 1
121 Then node 1 expands to housenumbers
122 | housenumber | centroid
124 And node 2 expands to housenumbers
125 | housenumber | centroid
130 Scenario: Reverse even two point interpolation with odd end
131 Given the place nodes
132 | osm_id | class | type | housenumber | geometry
133 | 1 | place | house | 10 | 1 1
134 | 2 | place | house | 15 | 1 1.001
136 | osm_id | class | type | housenumber | geometry
137 | 1 | place | houses | even | 1 1.001, 1 1
142 Then node 1 expands to housenumbers
143 | housenumber | centroid
145 And node 2 expands to housenumbers
146 | housenumber | centroid
151 Scenario: Simple odd two point interpolation
152 Given the place nodes
153 | osm_id | class | type | housenumber | geometry
154 | 1 | place | house | 1 | 1 1
155 | 2 | place | house | 11 | 1 1.001
157 | osm_id | class | type | housenumber | geometry
158 | 1 | place | houses | odd | 1 1, 1 1.001
163 Then node 1 expands to housenumbers
164 | housenumber | centroid
170 And node 2 expands to housenumbers
171 | housenumber | centroid
174 Scenario: Odd two point interpolation with even beginning
175 Given the place nodes
176 | osm_id | class | type | housenumber | geometry
177 | 1 | place | house | 2 | 1 1
178 | 2 | place | house | 7 | 1 1.001
180 | osm_id | class | type | housenumber | geometry
181 | 1 | place | houses | odd | 1 1, 1 1.001
186 Then node 1 expands to housenumbers
187 | housenumber | centroid
191 And node 2 expands to housenumbers
192 | housenumber | centroid
195 Scenario: Simple all two point interpolation
196 Given the place nodes
197 | osm_id | class | type | housenumber | geometry
198 | 1 | place | house | 1 | 1 1
199 | 2 | place | house | 3 | 1 1.001
201 | osm_id | class | type | housenumber | geometry
202 | 1 | place | houses | all | 1 1, 1 1.001
207 Then node 1 expands to housenumbers
208 | housenumber | centroid
211 And node 2 expands to housenumbers
212 | housenumber | centroid
215 Scenario: Simple numbered two point interpolation
216 Given the place nodes
217 | osm_id | class | type | housenumber | geometry
218 | 1 | place | house | 3 | 1 1
219 | 2 | place | house | 9 | 1 1.001
221 | osm_id | class | type | housenumber | geometry
222 | 1 | place | houses | 3 | 1 1, 1 1.001
227 Then node 1 expands to housenumbers
228 | housenumber | centroid
231 And node 2 expands to housenumbers
232 | housenumber | centroid
235 Scenario: Even two point interpolation with intermediate empty node
236 Given the place nodes
237 | osm_id | class | type | housenumber | geometry
238 | 1 | place | house | 2 | 1 1
239 | 2 | place | house | 10 | 1.001 1.001
241 | osm_id | class | type | housenumber | geometry
242 | 1 | place | houses | even | 1 1, 1 1.001, 1.001 1.001
247 Then node 1 expands to housenumbers
248 | housenumber | centroid
253 And node 2 expands to housenumbers
254 | housenumber | centroid
258 Scenario: Even two point interpolation with intermediate duplicated empty node
259 Given the place nodes
260 | osm_id | class | type | housenumber | geometry
261 | 1 | place | house | 2 | 1 1
262 | 2 | place | house | 10 | 1.001 1.001
264 | osm_id | class | type | housenumber | geometry
265 | 1 | place | houses | even | 1 1, 1 1.001, 1.001 1.001
270 Then node 1 expands to housenumbers
271 | housenumber | centroid
276 And node 2 expands to housenumbers
277 | housenumber | centroid
280 Scenario: Simple even three point interpolation
281 Given the place nodes
282 | osm_id | class | type | housenumber | geometry
283 | 1 | place | house | 2 | 1 1
284 | 2 | place | house | 8 | 1.001 1.001
285 | 3 | place | house | 4 | 1 1.001
287 | osm_id | class | type | housenumber | geometry
288 | 1 | place | houses | even | 1 1, 1 1.001, 1.001 1.001
293 Then node 1 expands to housenumbers
294 | housenumber | centroid
296 Then node 3 expands to housenumbers
297 | housenumber | centroid
300 And node 2 expands to housenumbers
301 | housenumber | centroid
304 Scenario: Even three point interpolation with odd center point
305 Given the place nodes
306 | osm_id | class | type | housenumber | geometry
307 | 1 | place | house | 2 | 1 1
308 | 2 | place | house | 8 | 1.001 1.001
309 | 3 | place | house | 7 | 1 1.001
311 | osm_id | class | type | housenumber | geometry
312 | 1 | place | houses | even | 1 1, 1 1.001, 1.001 1.001
317 Then node 1 expands to housenumbers
318 | housenumber | centroid
322 Then node 3 expands to housenumbers
323 | housenumber | centroid
325 And node 2 expands to housenumbers
326 | housenumber | centroid
329 Scenario: Interpolation on self-intersecting way
330 Given the place nodes
331 | osm_id | class | type | housenumber | geometry
332 | 1 | place | house | 2 | 0 0
333 | 2 | place | house | 6 | 0 0.001
334 | 3 | place | house | 10 | 0 0.002
336 | osm_id | class | type | housenumber | geometry
337 | 1 | place | houses | even | 0 0, 0 0.001, 0 0.002, 0 0.001
342 Then node 1 expands to housenumbers
343 | housenumber | centroid
346 Then node 2 expands to housenumbers
347 | housenumber | centroid
350 Then node 3 expands to housenumbers
351 | housenumber | centroid
355 Scenario: Interpolation on self-intersecting way II
356 Given the place nodes
357 | osm_id | class | type | housenumber | geometry
358 | 1 | place | house | 2 | 0 0
359 | 2 | place | house | 6 | 0 0.001
361 | osm_id | class | type | housenumber | geometry
362 | 1 | place | houses | even | 0 0, 0 0.001, 0 0.002, 0 0.001
367 Then node 1 expands to housenumbers
368 | housenumber | centroid
371 Then node 2 expands to housenumbers
372 | housenumber | centroid