2 Feature: Import of address interpolations
3 Tests that interpolated addresses are added correctly
5 Scenario: Simple even interpolation line with two points and no street nearby
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 no interpolation
21 Scenario: Simple even interpolation line with two points
22 Given the grid with origin 1,1
26 | osm | class | type | housenr |
27 | N1 | place | house | 2 |
28 | N2 | place | house | 6 |
30 | osm | class | type | addr+interpolation | geometry |
31 | W1 | place | houses | even | 1,2 |
33 | osm | class | type | geometry |
34 | W10 | highway | residential | 4,5 |
39 Then W1 expands to interpolation
40 | start | end | geometry |
43 Scenario: Backwards even two point interpolation line
44 Given the grid with origin 1,1
48 | osm | class | type | housenr |
49 | N1 | place | house | 2 |
50 | N2 | place | house | 8 |
52 | osm | class | type | addr+interpolation | geometry |
53 | W1 | place | houses | even | 2,1 |
55 | osm | class | type | geometry |
56 | W10 | highway | residential | 4,5 |
61 Then W1 expands to interpolation
62 | start | end | geometry |
65 Scenario: Simple odd two point interpolation
66 Given the grid with origin 1,1
70 | osm | class | type | housenr |
71 | N1 | place | house | 1 |
72 | N2 | place | house | 11 |
74 | osm | class | type | addr+interpolation | geometry |
75 | W1 | place | houses | odd | 1,2 |
77 | osm | class | type | geometry |
78 | W10 | highway | residential | 4,5 |
83 Then W1 expands to interpolation
84 | start | end | geometry |
87 Scenario: Simple all two point interpolation
88 Given the grid with origin 1,1
92 | osm | class | type | housenr |
93 | N1 | place | house | 1 |
94 | N2 | place | house | 4 |
96 | osm | class | type | addr+interpolation | geometry |
97 | W1 | place | houses | all | 1,2 |
99 | osm | class | type | geometry |
100 | W10 | highway | residential | 4,5 |
105 Then W1 expands to interpolation
106 | start | end | geometry |
109 Scenario: Even two point interpolation line with intermediate empty node
111 | 1 | 8 | | 3 | 9 | 2 |
114 | osm | class | type | housenr |
115 | N1 | place | house | 2 |
116 | N2 | place | house | 12 |
118 | osm | class | type | addr+interpolation | geometry |
119 | W1 | place | houses | even | 1,3,2 |
121 | osm | class | type | geometry |
122 | W10 | highway | residential | 4,5 |
127 Then W1 expands to interpolation
128 | start | end | geometry |
131 Scenario: Even two point interpolation line with intermediate duplicated empty node
134 | 1 | 8 | 3 | 9 | 2 |
136 | osm | class | type | housenr |
137 | N1 | place | house | 2 |
138 | N2 | place | house | 10 |
140 | osm | class | type | addr+interpolation | geometry |
141 | W1 | place | houses | even | 1,3,2 |
143 | osm | class | type | geometry |
144 | W10 | highway | residential | 4,5 |
149 Then W1 expands to interpolation
150 | start | end | geometry |
153 Scenario: Simple even three point interpolation line
156 | 1 | 8 | | 9 | 3 | 7 | 2 |
158 | osm | class | type | housenr |
159 | N1 | place | house | 2 |
160 | N2 | place | house | 14 |
161 | N3 | place | house | 10 |
163 | osm | class | type | addr+interpolation | geometry |
164 | W1 | place | houses | even | 1,3,2 |
166 | osm | class | type | geometry |
167 | W10 | highway | residential | 4,5 |
172 Then W1 expands to interpolation
173 | start | end | geometry |
177 Scenario: Simple even four point interpolation line
179 | 1 | 10 | | 11 | 3 |
183 | osm | class | type | housenr |
184 | N1 | place | house | 2 |
185 | N2 | place | house | 14 |
186 | N3 | place | house | 10 |
187 | N4 | place | house | 18 |
189 | osm | class | type | addr+interpolation | geometry |
190 | W1 | place | houses | even | 1,3,2,4 |
192 | osm | class | type | geometry |
193 | W10 | highway | residential | 1,3,2,4 |
198 Then W1 expands to interpolation
199 | start | end | geometry |
204 Scenario: Reverse simple even three point interpolation line
206 | 1 | 8 | | 9 | 3 | 7 | 2 |
209 | osm | class | type | housenr |
210 | N1 | place | house | 2 |
211 | N2 | place | house | 14 |
212 | N3 | place | house | 10 |
214 | osm | class | type | addr+interpolation | geometry |
215 | W1 | place | houses | even | 2,3,1 |
217 | osm | class | type | geometry |
218 | W10 | highway | residential | 4,5 |
223 Then W1 expands to interpolation
224 | start | end | geometry |
228 Scenario: Even three point interpolation line with odd center point
230 | 1 | | 10 | | | 11 | 3 | 2 |
231 | 4 | | | | | | | 5 |
233 | osm | class | type | housenr |
234 | N1 | place | house | 2 |
235 | N2 | place | house | 8 |
236 | N3 | place | house | 7 |
238 | osm | class | type | addr+interpolation | geometry |
239 | W1 | place | houses | even | 1,3,2 |
241 | osm | class | type | geometry |
242 | W10 | highway | residential | 4,5 |
247 Then W1 expands to interpolation
248 | start | end | geometry |
251 Scenario: Interpolation line with self-intersecting way
257 | osm | class | type | housenr |
258 | N1 | place | house | 2 |
259 | N2 | place | house | 6 |
260 | N3 | place | house | 10 |
262 | osm | class | type | addr+interpolation | geometry |
263 | W1 | place | houses | even | 1,2,3,2 |
265 | osm | class | type | geometry |
266 | W10 | highway | residential | 1,2,3 |
271 Then W1 expands to interpolation
272 | start | end | geometry |
277 Scenario: Interpolation line with self-intersecting way II
282 | osm | class | type | housenr |
283 | N1 | place | house | 2 |
284 | N2 | place | house | 6 |
286 | osm | class | type | addr+interpolation | geometry |
287 | W1 | place | houses | even | 1,2,3,2 |
289 | osm | class | type | geometry |
290 | W10 | highway | residential | 1,2,3 |
295 Then W1 expands to interpolation
296 | start | end | geometry |
299 Scenario: addr:street on interpolation way
305 | osm | class | type | housenr | geometry |
306 | N1 | place | house | 2 | 1 |
307 | N2 | place | house | 6 | 2 |
308 | N3 | place | house | 12 | 1 |
309 | N4 | place | house | 16 | 2 |
311 | osm | class | type | addr+interpolation | street | geometry |
312 | W10 | place | houses | even | | 1,2 |
313 | W11 | place | houses | even | Cloud Street | 1,2 |
315 | osm | class | type | name | geometry |
316 | W2 | highway | tertiary | Sun Way | 10,11 |
317 | W3 | highway | tertiary | Cloud Street | 20,21 |
324 | object | parent_place_id |
329 Then W10 expands to interpolation
330 | parent_place_id | start | end |
332 Then W11 expands to interpolation
333 | parent_place_id | start | end |
335 When sending search query "16 Cloud Street"
339 When sending search query "14 Cloud Street"
344 Scenario: addr:street on housenumber way
350 | osm | class | type | housenr | street | geometry |
351 | N1 | place | house | 2 | | 1 |
352 | N2 | place | house | 6 | | 2 |
353 | N3 | place | house | 12 | Cloud Street | 1 |
354 | N4 | place | house | 16 | Cloud Street | 2 |
356 | osm | class | type | addr+interpolation | geometry |
357 | W10 | place | houses | even | 1,2 |
358 | W11 | place | houses | even | 1,2 |
360 | osm | class | type | name | geometry |
361 | W2 | highway | tertiary | Sun Way | 10,11 |
362 | W3 | highway | tertiary | Cloud Street | 20,21 |
369 | object | parent_place_id |
374 Then W10 expands to interpolation
375 | parent_place_id | start | end |
377 Then W11 expands to interpolation
378 | parent_place_id | start | end |
380 When sending search query "16 Cloud Street"
384 When sending search query "14 Cloud Street"
389 Scenario: Geometry of points and way don't match (github #253)
391 | osm | class | type | housenr | geometry |
392 | N1 | place | house | 10 | 144.9632341 -37.76163 |
393 | N2 | place | house | 6 | 144.9630541 -37.7628174 |
394 | N3 | shop | supermarket | 2 | 144.9629794 -37.7630755 |
396 | osm | class | type | addr+interpolation | geometry |
397 | W1 | place | houses | even | 144.9632341 -37.76163,144.9630541 -37.7628172,144.9629794 -37.7630755 |
399 | osm | class | type | geometry |
400 | W10 | highway | residential | 144.9632341 -37.76163,144.9629794 -37.7630755 |
405 Then W1 expands to interpolation
406 | start | end | geometry |
407 | 4 | 4 | 144.963016 -37.762946 |
408 | 8 | 8 | 144.96314407 -37.762223692 |
410 Scenario: Place with missing address information
415 | osm | class | type | housenr |
416 | N1 | place | house | 23 |
417 | N2 | amenity | school | |
418 | N3 | place | house | 29 |
420 | osm | class | type | addr+interpolation | geometry |
421 | W1 | place | houses | odd | 1,2,3 |
423 | osm | class | type | geometry |
424 | W10 | highway | residential | 4,5 |
429 Then W1 expands to interpolation
430 | start | end | geometry |
431 | 25 | 27 | 0.000016 0,0.00002 0,0.000033 0 |
433 Scenario: Ways without node entries are ignored
435 | osm | class | type | housenr | geometry |
436 | W1 | place | houses | even | 1 1, 1 1.001 |
438 | osm | class | type | geometry |
439 | W10 | highway | residential | 1 1, 1 1.001 |
441 Then W1 expands to no interpolation
443 Scenario: Ways with nodes without housenumbers are ignored
448 | osm | class | type |
449 | N1 | place | house |
450 | N2 | place | house |
452 | osm | class | type | housenr | geometry |
453 | W1 | place | houses | even | 1,2 |
455 | osm | class | type | geometry |
456 | W10 | highway | residential | 4,5 |
458 Then W1 expands to no interpolation
460 Scenario: Two point interpolation starting at 0
461 Given the grid with origin 1,1
462 | 1 | 10 | | | 11 | 2 |
465 | osm | class | type | housenr |
466 | N1 | place | house | 0 |
467 | N2 | place | house | 10 |
469 | osm | class | type | addr+interpolation | geometry |
470 | W1 | place | houses | even | 1,2 |
472 | osm | class | type | name | geometry |
473 | W10 | highway | residential | London Road |4,5 |
478 Then W1 expands to interpolation
479 | start | end | geometry |
481 When sending v1/reverse at 1,1
483 | ID | osm | type | display_name |
484 | 0 | N1 | house | 0, London Road |
486 Scenario: Parenting of interpolation with additional tags
494 | osm | class | type | housenr | addr+street |
495 | N8 | place | house | 10 | Horiz St |
496 | N9 | place | house | 16 | Horiz St |
498 | osm | class | type | name | geometry |
499 | W1 | highway | residential | Vert St | 1,2 |
500 | W2 | highway | residential | Horiz St | 2,3 |
502 | osm | class | type | addr+interpolation | addr+inclusion | geometry |
503 | W10 | place | houses | even | actual | 8,9 |
509 | object | parent_place_id |
512 And W10 expands to interpolation
513 | start | end | parent_place_id |
517 Scenario Outline: Bad interpolation values are ignored
518 Given the grid with origin 1,1
522 | osm | class | type | housenr |
523 | N1 | place | house | 2 |
524 | N2 | place | house | 6 |
526 | osm | class | type | addr+interpolation | geometry |
527 | W1 | place | houses | <value> | 1,2 |
529 | osm | class | type | geometry |
530 | W10 | highway | residential | 4,5 |
535 Then W1 expands to no interpolation
544 Scenario: Interpolation line where points have been moved (Github #3022)
545 Given the 0.00001 grid
546 | 1 | | | | | | | | 2 | 3 | 9 | | | | | | | | 4 |
548 | osm | class | type | housenr | geometry |
549 | N1 | place | house | 2 | 1 |
550 | N2 | place | house | 18 | 3 |
551 | N3 | place | house | 24 | 9 |
552 | N4 | place | house | 42 | 4 |
554 | osm | class | type | addr+interpolation | geometry |
555 | W1 | place | houses | even | 1,2,3,4 |
557 | osm | class | type | geometry |
558 | W10 | highway | residential | 1,4 |
563 Then W1 expands to interpolation
570 Scenario: Interpolation line with duplicated points
572 | 7 | 10 | 8 | 11 | 9 |
575 | osm | class | type | housenr | geometry |
576 | N1 | place | house | 2 | 7 |
577 | N2 | place | house | 6 | 8 |
578 | N3 | place | house | 10 | 8 |
579 | N4 | place | house | 14 | 9 |
581 | osm | class | type | addr+interpolation | geometry |
582 | W1 | place | houses | even | 7,8,8,9 |
584 | osm | class | type | geometry |
585 | W10 | highway | residential | 4,5 |
590 Then W1 expands to interpolation
591 | start | end | geometry |
596 Scenario: Interpolaton line with broken way geometry (Github #2986)
598 | 1 | 8 | 10 | 11 | 9 | 2 | 3 | 4 |
600 | osm | class | type | housenr |
601 | N1 | place | house | 2 |
602 | N2 | place | house | 8 |
603 | N3 | place | house | 12 |
604 | N4 | place | house | 14 |
606 | osm | class | type | addr+interpolation | geometry |
607 | W1 | place | houses | even | 8,9 |
609 | osm | class | type | geometry |
610 | W10 | highway | residential | 1,4 |
615 Then W1 expands to interpolation
616 | start | end | geometry |