2
2
Feature : Import of address interpolations
3
3
Tests that interpolated addresses are added correctly
4
4
5
+ Scenario : Simple even interpolation line with two points and no street nearby
6
+ Given the grid with origin 1,1
7
+ | 1 | | 9 | | 2 |
8
+ Given the places
9
+ | osm | class | type | housenr |
10
+ | N1 | place | house | 2 |
11
+ | N2 | place | house | 6 |
12
+ And the places
13
+ | osm | class | type | addr +interpolation | geometry |
14
+ | W1 | place | houses | even | 1 ,2 |
15
+ And the ways
16
+ | id | nodes |
17
+ | 1 | 1 ,2 |
18
+ When importing
19
+ Then W1 expands to no interpolation
20
+
5
21
Scenario : Simple even interpolation line with two points
6
22
Given the grid with origin 1,1
7
23
| 1 | | 9 | | 2 |
24
+ | 4 | | | | 5 |
8
25
Given the places
9
26
| osm | class | type | housenr |
10
27
| N1 | place | house | 2 |
11
28
| N2 | place | house | 6 |
12
29
And the places
13
30
| osm | class | type | addr +interpolation | geometry |
14
31
| W1 | place | houses | even | 1 ,2 |
32
+ And the named places
33
+ | osm | class | type | geometry |
34
+ | W10 | highway | residential | 4 ,5 |
15
35
And the ways
16
36
| id | nodes |
17
37
| 1 | 1 ,2 |
@@ -23,13 +43,17 @@ Feature: Import of address interpolations
23
43
Scenario : Backwards even two point interpolation line
24
44
Given the grid with origin 1,1
25
45
| 1 | 8 | 9 | 2 |
46
+ | 4 | | | 5 |
26
47
Given the places
27
48
| osm | class | type | housenr |
28
49
| N1 | place | house | 2 |
29
50
| N2 | place | house | 8 |
30
51
And the places
31
52
| osm | class | type | addr +interpolation | geometry |
32
53
| W1 | place | houses | even | 2 ,1 |
54
+ And the named places
55
+ | osm | class | type | geometry |
56
+ | W10 | highway | residential | 4 ,5 |
33
57
And the ways
34
58
| id | nodes |
35
59
| 1 | 2 ,1 |
@@ -41,13 +65,17 @@ Feature: Import of address interpolations
41
65
Scenario : Simple odd two point interpolation
42
66
Given the grid with origin 1,1
43
67
| 1 | 8 | | | 9 | 2 |
68
+ | 4 | | | | 5 | |
44
69
Given the places
45
70
| osm | class | type | housenr |
46
71
| N1 | place | house | 1 |
47
72
| N2 | place | house | 11 |
48
73
And the places
49
74
| osm | class | type | addr +interpolation | geometry |
50
75
| W1 | place | houses | odd | 1 ,2 |
76
+ And the named places
77
+ | osm | class | type | geometry |
78
+ | W10 | highway | residential | 4 ,5 |
51
79
And the ways
52
80
| id | nodes |
53
81
| 1 | 1 ,2 |
@@ -59,13 +87,17 @@ Feature: Import of address interpolations
59
87
Scenario : Simple all two point interpolation
60
88
Given the grid with origin 1,1
61
89
| 1 | 8 | 9 | 2 |
90
+ | 4 | | | 5 |
62
91
Given the places
63
92
| osm | class | type | housenr |
64
93
| N1 | place | house | 1 |
65
94
| N2 | place | house | 4 |
66
95
And the places
67
96
| osm | class | type | addr +interpolation | geometry |
68
97
| W1 | place | houses | all | 1 ,2 |
98
+ And the named places
99
+ | osm | class | type | geometry |
100
+ | W10 | highway | residential | 4 ,5 |
69
101
And the ways
70
102
| id | nodes |
71
103
| 1 | 1 ,2 |
@@ -77,13 +109,17 @@ Feature: Import of address interpolations
77
109
Scenario : Even two point interpolation line with intermediate empty node
78
110
Given the grid
79
111
| 1 | 8 | | 3 | 9 | 2 |
112
+ | 4 | | | | 5 | |
80
113
Given the places
81
114
| osm | class | type | housenr |
82
115
| N1 | place | house | 2 |
83
116
| N2 | place | house | 12 |
84
117
And the places
85
118
| osm | class | type | addr +interpolation | geometry |
86
119
| W1 | place | houses | even | 1 ,3 ,2 |
120
+ And the named places
121
+ | osm | class | type | geometry |
122
+ | W10 | highway | residential | 4 ,5 |
87
123
And the ways
88
124
| id | nodes |
89
125
| 1 | 1 ,3 ,2 |
@@ -94,6 +130,7 @@ Feature: Import of address interpolations
94
130
95
131
Scenario : Even two point interpolation line with intermediate duplicated empty node
96
132
Given the grid
133
+ | 4 | | | | 5 |
97
134
| 1 | 8 | 3 | 9 | 2 |
98
135
Given the places
99
136
| osm | class | type | housenr |
@@ -102,6 +139,9 @@ Feature: Import of address interpolations
102
139
And the places
103
140
| osm | class | type | addr +interpolation | geometry |
104
141
| W1 | place | houses | even | 1 ,3 ,2 |
142
+ And the named places
143
+ | osm | class | type | geometry |
144
+ | W10 | highway | residential | 4 ,5 |
105
145
And the ways
106
146
| id | nodes |
107
147
| 1 | 1 ,3 ,3 ,2 |
@@ -112,6 +152,7 @@ Feature: Import of address interpolations
112
152
113
153
Scenario : Simple even three point interpolation line
114
154
Given the grid
155
+ | 4 | | | | | | 5 |
115
156
| 1 | 8 | | 9 | 3 | 7 | 2 |
116
157
Given the places
117
158
| osm | class | type | housenr |
@@ -121,6 +162,9 @@ Feature: Import of address interpolations
121
162
And the places
122
163
| osm | class | type | addr +interpolation | geometry |
123
164
| W1 | place | houses | even | 1 ,3 ,2 |
165
+ And the named places
166
+ | osm | class | type | geometry |
167
+ | W10 | highway | residential | 4 ,5 |
124
168
And the ways
125
169
| id | nodes |
126
170
| 1 | 1 ,3 ,2 |
@@ -144,6 +188,9 @@ Feature: Import of address interpolations
144
188
And the places
145
189
| osm | class | type | addr +interpolation | geometry |
146
190
| W1 | place | houses | even | 1 ,3 ,2 ,4 |
191
+ And the named places
192
+ | osm | class | type | geometry |
193
+ | W10 | highway | residential | 1 ,3 ,2 ,4 |
147
194
And the ways
148
195
| id | nodes |
149
196
| 1 | 1 ,3 ,2 ,4 |
@@ -157,6 +204,7 @@ Feature: Import of address interpolations
157
204
Scenario : Reverse simple even three point interpolation line
158
205
Given the grid
159
206
| 1 | 8 | | 9 | 3 | 7 | 2 |
207
+ | 4 | | | | | | 5 |
160
208
Given the places
161
209
| osm | class | type | housenr |
162
210
| N1 | place | house | 2 |
@@ -165,6 +213,9 @@ Feature: Import of address interpolations
165
213
And the places
166
214
| osm | class | type | addr +interpolation | geometry |
167
215
| W1 | place | houses | even | 2 ,3 ,1 |
216
+ And the named places
217
+ | osm | class | type | geometry |
218
+ | W10 | highway | residential | 4 ,5 |
168
219
And the ways
169
220
| id | nodes |
170
221
| 1 | 2 ,3 ,1 |
@@ -177,6 +228,7 @@ Feature: Import of address interpolations
177
228
Scenario : Even three point interpolation line with odd center point
178
229
Given the grid
179
230
| 1 | | 10 | | | 11 | 3 | 2 |
231
+ | 4 | | | | | | | 5 |
180
232
Given the places
181
233
| osm | class | type | housenr |
182
234
| N1 | place | house | 2 |
@@ -185,6 +237,9 @@ Feature: Import of address interpolations
185
237
And the places
186
238
| osm | class | type | addr +interpolation | geometry |
187
239
| W1 | place | houses | even | 1 ,3 ,2 |
240
+ And the named places
241
+ | osm | class | type | geometry |
242
+ | W10 | highway | residential | 4 ,5 |
188
243
And the ways
189
244
| id | nodes |
190
245
| 1 | 1 ,3 ,2 |
@@ -206,6 +261,9 @@ Feature: Import of address interpolations
206
261
And the places
207
262
| osm | class | type | addr +interpolation | geometry |
208
263
| W1 | place | houses | even | 1 ,2 ,3 ,2 |
264
+ And the named places
265
+ | osm | class | type | geometry |
266
+ | W10 | highway | residential | 1 ,2 ,3 |
209
267
And the ways
210
268
| id | nodes |
211
269
| 1 | 1 ,2 ,3 ,2 |
@@ -227,6 +285,9 @@ Feature: Import of address interpolations
227
285
And the places
228
286
| osm | class | type | addr +interpolation | geometry |
229
287
| W1 | place | houses | even | 1 ,2 ,3 ,2 |
288
+ And the named places
289
+ | osm | class | type | geometry |
290
+ | W10 | highway | residential | 1 ,2 ,3 |
230
291
And the ways
231
292
| id | nodes |
232
293
| 1 | 1 ,2 ,3 ,2 |
@@ -334,6 +395,9 @@ Feature: Import of address interpolations
334
395
And the places
335
396
| osm | class | type | addr +interpolation | geometry |
336
397
| W1 | place | houses | even | 144 .9632341 -37 .76163 ,144 .9630541 -37 .7628172 ,144 .9629794 -37 .7630755 |
398
+ And the named places
399
+ | osm | class | type | geometry |
400
+ | W10 | highway | residential | 144 .9632341 -37 .76163 ,144 .9629794 -37 .7630755 |
337
401
And the ways
338
402
| id | nodes |
339
403
| 1 | 1 ,2 ,3 |
@@ -346,6 +410,7 @@ Feature: Import of address interpolations
346
410
Scenario : Place with missing address information
347
411
Given the grid
348
412
| 1 | | 2 | | | 3 |
413
+ | 4 | | | | | 5 |
349
414
And the places
350
415
| osm | class | type | housenr |
351
416
| N1 | place | house | 23 |
@@ -354,6 +419,9 @@ Feature: Import of address interpolations
354
419
And the places
355
420
| osm | class | type | addr +interpolation | geometry |
356
421
| W1 | place | houses | odd | 1 ,2 ,3 |
422
+ And the named places
423
+ | osm | class | type | geometry |
424
+ | W10 | highway | residential | 4 ,5 |
357
425
And the ways
358
426
| id | nodes |
359
427
| 1 | 1 ,2 ,3 |
@@ -366,32 +434,43 @@ Feature: Import of address interpolations
366
434
Given the places
367
435
| osm | class | type | housenr | geometry |
368
436
| W1 | place | houses | even | 1 1 , 1 1 .001 |
437
+ And the named places
438
+ | osm | class | type | geometry |
439
+ | W10 | highway | residential | 1 1 , 1 1 .001 |
369
440
When importing
370
441
Then W1 expands to no interpolation
371
442
372
443
Scenario : Ways with nodes without housenumbers are ignored
373
444
Given the grid
374
- | 1 | | 2 |
445
+ | 1 | | 2 |
446
+ | 4 | | 5 |
375
447
Given the places
376
448
| osm | class | type |
377
449
| N1 | place | house |
378
450
| N2 | place | house |
379
451
Given the places
380
452
| osm | class | type | housenr | geometry |
381
453
| W1 | place | houses | even | 1 ,2 |
454
+ And the named places
455
+ | osm | class | type | geometry |
456
+ | W10 | highway | residential | 4 ,5 |
382
457
When importing
383
458
Then W1 expands to no interpolation
384
459
385
460
Scenario : Two point interpolation starting at 0
386
461
Given the grid with origin 1,1
387
462
| 1 | 10 | | | 11 | 2 |
463
+ | 4 | | | | | 5 |
388
464
Given the places
389
465
| osm | class | type | housenr |
390
466
| N1 | place | house | 0 |
391
467
| N2 | place | house | 10 |
392
468
And the places
393
469
| osm | class | type | addr +interpolation | geometry |
394
470
| W1 | place | houses | even | 1 ,2 |
471
+ And the places
472
+ | osm | class | type | name | geometry |
473
+ | W10 | highway | residential | London Road |4 ,5 |
395
474
And the ways
396
475
| id | nodes |
397
476
| 1 | 1 ,2 |
@@ -402,7 +481,7 @@ Feature: Import of address interpolations
402
481
When sending v1/reverse at 1,1
403
482
Then results contain
404
483
| ID | osm | type | display_name |
405
- | 0 | N1 | house | 0 |
484
+ | 0 | N1 | house | 0 , London Road |
406
485
407
486
Scenario : Parenting of interpolation with additional tags
408
487
Given the grid
@@ -438,13 +517,17 @@ Feature: Import of address interpolations
438
517
Scenario Outline : Bad interpolation values are ignored
439
518
Given the grid with origin 1,1
440
519
| 1 | | 9 | | 2 |
520
+ | 4 | | | | 5 |
441
521
Given the places
442
522
| osm | class | type | housenr |
443
523
| N1 | place | house | 2 |
444
524
| N2 | place | house | 6 |
445
525
And the places
446
526
| osm | class | type | addr +interpolation | geometry |
447
527
| W1 | place | houses | <value > | 1 ,2 |
528
+ And the named places
529
+ | osm | class | type | geometry |
530
+ | W10 | highway | residential | 4 ,5 |
448
531
And the ways
449
532
| id | nodes |
450
533
| 1 | 1 ,2 |
@@ -470,6 +553,9 @@ Feature: Import of address interpolations
470
553
And the places
471
554
| osm | class | type | addr +interpolation | geometry |
472
555
| W1 | place | houses | even | 1 ,2 ,3 ,4 |
556
+ And the named places
557
+ | osm | class | type | geometry |
558
+ | W10 | highway | residential | 1 ,4 |
473
559
And the ways
474
560
| id | nodes |
475
561
| 1 | 1 ,2 ,3 ,4 |
@@ -484,6 +570,7 @@ Feature: Import of address interpolations
484
570
Scenario : Interpolation line with duplicated points
485
571
Given the grid
486
572
| 7 | 10 | 8 | 11 | 9 |
573
+ | 4 | | | | 5 |
487
574
Given the places
488
575
| osm | class | type | housenr | geometry |
489
576
| N1 | place | house | 2 | 7 |
@@ -493,6 +580,9 @@ Feature: Import of address interpolations
493
580
And the places
494
581
| osm | class | type | addr +interpolation | geometry |
495
582
| W1 | place | houses | even | 7 ,8 ,8 ,9 |
583
+ And the named places
584
+ | osm | class | type | geometry |
585
+ | W10 | highway | residential | 4 ,5 |
496
586
And the ways
497
587
| id | nodes |
498
588
| 1 | 1 ,2 ,3 ,4 |
@@ -515,6 +605,9 @@ Feature: Import of address interpolations
515
605
And the places
516
606
| osm | class | type | addr +interpolation | geometry |
517
607
| W1 | place | houses | even | 8 ,9 |
608
+ And the named places
609
+ | osm | class | type | geometry |
610
+ | W10 | highway | residential | 1 ,4 |
518
611
And the ways
519
612
| id | nodes |
520
613
| 1 | 1 ,8 ,9 ,2 ,3 ,4 |
0 commit comments