2 Feature: Import of address interpolations
3 Tests that interpolated addresses are added correctly
5 Scenario: Simple even interpolation line with two points
6 Given the grid with origin 1,1
9 | osm | class | type | housenr |
10 | N1 | place | house | 2 |
11 | N2 | place | house | 6 |
13 | osm | class | type | addr+interpolation | geometry |
14 | W1 | place | houses | even | 1,2 |
19 Then W1 expands to interpolation
20 | start | end | geometry |
23 Scenario: Backwards even two point interpolation line
24 Given the grid with origin 1,1
27 | osm | class | type | housenr |
28 | N1 | place | house | 2 |
29 | N2 | place | house | 8 |
31 | osm | class | type | addr+interpolation | geometry |
32 | W1 | place | houses | even | 1,2 |
37 Then W1 expands to interpolation
38 | start | end | geometry |
41 Scenario: Simple odd two point interpolation
42 Given the grid with origin 1,1
45 | osm | class | type | housenr |
46 | N1 | place | house | 1 |
47 | N2 | place | house | 11 |
49 | osm | class | type | addr+interpolation | geometry |
50 | W1 | place | houses | odd | 1,2 |
55 Then W1 expands to interpolation
56 | start | end | geometry |
59 Scenario: Simple all two point interpolation
60 Given the grid with origin 1,1
63 | osm | class | type | housenr |
64 | N1 | place | house | 1 |
65 | N2 | place | house | 4 |
67 | osm | class | type | addr+interpolation | geometry |
68 | W1 | place | houses | all | 1,2 |
73 Then W1 expands to interpolation
74 | start | end | geometry |
77 Scenario: Even two point interpolation line with intermediate empty node
79 | 1 | 8 | | 3 | 9 | 2 |
81 | osm | class | type | housenr |
82 | N1 | place | house | 2 |
83 | N2 | place | house | 12 |
85 | osm | class | type | addr+interpolation | geometry |
86 | W1 | place | houses | even | 1,3,2 |
91 Then W1 expands to interpolation
92 | start | end | geometry |
95 Scenario: Even two point interpolation line with intermediate duplicated empty node
99 | osm | class | type | housenr |
100 | N1 | place | house | 2 |
101 | N2 | place | house | 10 |
103 | osm | class | type | addr+interpolation | geometry |
104 | W1 | place | houses | even | 1,3,2 |
109 Then W1 expands to interpolation
110 | start | end | geometry |
113 Scenario: Simple even three point interpolation line
115 | 1 | 8 | | 9 | 3 | 7 | 2 |
117 | osm | class | type | housenr |
118 | N1 | place | house | 2 |
119 | N2 | place | house | 14 |
120 | N3 | place | house | 10 |
122 | osm | class | type | addr+interpolation | geometry |
123 | W1 | place | houses | even | 1,3,2 |
128 Then W1 expands to interpolation
129 | start | end | geometry |
133 Scenario: Simple even four point interpolation line
135 | 1 | 10 | | 11 | 3 |
139 | osm | class | type | housenr |
140 | N1 | place | house | 2 |
141 | N2 | place | house | 14 |
142 | N3 | place | house | 10 |
143 | N4 | place | house | 18 |
145 | osm | class | type | addr+interpolation | geometry |
146 | W1 | place | houses | even | 1,3,2,4 |
151 Then W1 expands to interpolation
152 | start | end | geometry |
157 Scenario: Reverse simple even three point interpolation line
159 | 1 | 8 | | 9 | 3 | 7 | 2 |
161 | osm | class | type | housenr |
162 | N1 | place | house | 2 |
163 | N2 | place | house | 14 |
164 | N3 | place | house | 10 |
166 | osm | class | type | addr+interpolation | geometry |
167 | W1 | place | houses | even | 2,3,1 |
172 Then W1 expands to interpolation
173 | start | end | geometry |
177 Scenario: Even three point interpolation line with odd center point
179 | 1 | | 10 | | | 11 | 3 | 2 |
181 | osm | class | type | housenr |
182 | N1 | place | house | 2 |
183 | N2 | place | house | 8 |
184 | N3 | place | house | 7 |
186 | osm | class | type | addr+interpolation | geometry |
187 | W1 | place | houses | even | 1,3,2 |
192 Then W1 expands to interpolation
193 | start | end | geometry |
196 Scenario: Interpolation line with self-intersecting way
202 | osm | class | type | housenr |
203 | N1 | place | house | 2 |
204 | N2 | place | house | 6 |
205 | N3 | place | house | 10 |
207 | osm | class | type | addr+interpolation | geometry |
208 | W1 | place | houses | even | 1,2,3,2 |
213 Then W1 expands to interpolation
214 | start | end | geometry |
219 Scenario: Interpolation line with self-intersecting way II
224 | osm | class | type | housenr |
225 | N1 | place | house | 2 |
226 | N2 | place | house | 6 |
228 | osm | class | type | addr+interpolation | geometry |
229 | W1 | place | houses | even | 1,2,3,2 |
234 Then W1 expands to interpolation
235 | start | end | geometry |
238 Scenario: addr:street on interpolation way
244 | osm | class | type | housenr | geometry |
245 | N1 | place | house | 2 | 1 |
246 | N2 | place | house | 6 | 2 |
247 | N3 | place | house | 12 | 1 |
248 | N4 | place | house | 16 | 2 |
250 | osm | class | type | addr+interpolation | street | geometry |
251 | W10 | place | houses | even | | 1,2 |
252 | W11 | place | houses | even | Cloud Street | 1,2 |
254 | osm | class | type | name | geometry |
255 | W2 | highway | tertiary | Sun Way | 10,11 |
256 | W3 | highway | tertiary | Cloud Street | 20,21 |
263 | object | parent_place_id |
268 Then W10 expands to interpolation
269 | parent_place_id | start | end |
271 Then W11 expands to interpolation
272 | parent_place_id | start | end |
274 When sending search query "16 Cloud Street"
278 When sending search query "14 Cloud Street"
283 Scenario: addr:street on housenumber way
289 | osm | class | type | housenr | street | geometry |
290 | N1 | place | house | 2 | | 1 |
291 | N2 | place | house | 6 | | 2 |
292 | N3 | place | house | 12 | Cloud Street | 1 |
293 | N4 | place | house | 16 | Cloud Street | 2 |
295 | osm | class | type | addr+interpolation | geometry |
296 | W10 | place | houses | even | 1,2 |
297 | W11 | place | houses | even | 1,2 |
299 | osm | class | type | name | geometry |
300 | W2 | highway | tertiary | Sun Way | 10,11 |
301 | W3 | highway | tertiary | Cloud Street | 20,21 |
308 | object | parent_place_id |
313 Then W10 expands to interpolation
314 | parent_place_id | start | end |
316 Then W11 expands to interpolation
317 | parent_place_id | start | end |
319 When sending search query "16 Cloud Street"
323 When sending search query "14 Cloud Street"
328 Scenario: Geometry of points and way don't match (github #253)
330 | osm | class | type | housenr | geometry |
331 | N1 | place | house | 10 | 144.9632341 -37.76163 |
332 | N2 | place | house | 6 | 144.9630541 -37.7628174 |
333 | N3 | shop | supermarket | 2 | 144.9629794 -37.7630755 |
335 | osm | class | type | addr+interpolation | geometry |
336 | W1 | place | houses | even | 144.9632341 -37.76163,144.9630541 -37.7628172,144.9629794 -37.7630755 |
341 Then W1 expands to interpolation
342 | start | end | geometry |
343 | 4 | 4 | 144.963016 -37.762946 |
344 | 8 | 8 | 144.963144 -37.7622237 |
346 Scenario: Place with missing address information
350 | osm | class | type | housenr |
351 | N1 | place | house | 23 |
352 | N2 | amenity | school | |
353 | N3 | place | house | 29 |
355 | osm | class | type | addr+interpolation | geometry |
356 | W1 | place | houses | odd | 1,2,3 |
361 Then W1 expands to interpolation
362 | start | end | geometry |
363 | 25 | 27 | 0.000016 0,0.00002 0,0.000033 0 |
365 Scenario: Ways without node entries are ignored
367 | osm | class | type | housenr | geometry |
368 | W1 | place | houses | even | 1 1, 1 1.001 |
370 Then W1 expands to no interpolation
372 Scenario: Ways with nodes without housenumbers are ignored
376 | osm | class | type |
377 | N1 | place | house |
378 | N2 | place | house |
380 | osm | class | type | housenr | geometry |
381 | W1 | place | houses | even | 1,2 |
383 Then W1 expands to no interpolation
385 Scenario: Two point interpolation starting at 0
386 Given the grid with origin 1,1
387 | 1 | 10 | | | 11 | 2 |
389 | osm | class | type | housenr |
390 | N1 | place | house | 0 |
391 | N2 | place | house | 10 |
393 | osm | class | type | addr+interpolation | geometry |
394 | W1 | place | houses | even | 1,2 |
399 Then W1 expands to interpolation
400 | start | end | geometry |
402 When sending v1/reverse at 1,1
404 | ID | osm | type | display_name |
405 | 0 | N1 | house | 0 |
407 Scenario: Parenting of interpolation with additional tags
415 | osm | class | type | housenr | addr+street |
416 | N8 | place | house | 10 | Horiz St |
417 | N9 | place | house | 16 | Horiz St |
419 | osm | class | type | name | geometry |
420 | W1 | highway | residential | Vert St | 1,2 |
421 | W2 | highway | residential | Horiz St | 2,3 |
423 | osm | class | type | addr+interpolation | addr+inclusion | geometry |
424 | W10 | place | houses | even | actual | 8,9 |
430 | object | parent_place_id |
433 And W10 expands to interpolation
434 | start | end | parent_place_id |
438 Scenario Outline: Bad interpolation values are ignored
439 Given the grid with origin 1,1
442 | osm | class | type | housenr |
443 | N1 | place | house | 2 |
444 | N2 | place | house | 6 |
446 | osm | class | type | addr+interpolation | geometry |
447 | W1 | place | houses | <value> | 1,2 |
452 Then W1 expands to no interpolation