2 Feature: Import of address interpolations
3 Tests that interpolated addresses are added correctly
5 Scenario: Simple even interpolation line with two points
7 | osm | class | type | housenr | geometry |
8 | N1 | place | house | 2 | 1 1 |
9 | N2 | place | house | 6 | 1 1.001 |
11 | osm | class | type | addr+interpolation | geometry |
12 | W1 | place | houses | even | 1 1, 1 1.001 |
17 Then W1 expands to interpolation
18 | start | end | geometry |
21 Scenario: Backwards even two point interpolation line
23 | osm | class | type | housenr | geometry |
24 | N1 | place | house | 2 | 1 1 |
25 | N2 | place | house | 8 | 1 1.003 |
27 | osm | class | type | addr+interpolation | geometry |
28 | W1 | place | houses | even | 1 1.003, 1 1 |
33 Then W1 expands to interpolation
34 | start | end | geometry |
35 | 4 | 6 | 1 1.001, 1 1.002 |
37 Scenario: Simple odd two point interpolation
39 | osm | class | type | housenr | geometry |
40 | N1 | place | house | 1 | 1 1 |
41 | N2 | place | house | 11 | 1 1.001 |
43 | osm | class | type | addr+interpolation | geometry |
44 | W1 | place | houses | odd | 1 1, 1 1.001 |
49 Then W1 expands to interpolation
50 | start | end | geometry |
51 | 3 | 9 | 1 1.0002, 1 1.0008 |
53 Scenario: Simple all two point interpolation
55 | osm | class | type | housenr | geometry |
56 | N1 | place | house | 1 | 1 1 |
57 | N2 | place | house | 4 | 1 1.003 |
59 | osm | class | type | addr+interpolation | geometry |
60 | W1 | place | houses | all | 1 1, 1 1.003 |
65 Then W1 expands to interpolation
66 | start | end | geometry |
67 | 2 | 3 | 1 1.001, 1 1.002 |
69 Scenario: Even two point interpolation line with intermediate empty node
71 | osm | class | type | housenr | geometry |
72 | N1 | place | house | 2 | 1 1 |
73 | N2 | place | house | 10 | 1.001 1.001 |
75 | osm | class | type | addr+interpolation | geometry |
76 | W1 | place | houses | even | 1 1, 1 1.001, 1.001 1.001 |
81 Then W1 expands to interpolation
82 | start | end | geometry |
83 | 4 | 8 | 1 1.0005, 1 1.001, 1.0005 1.001 |
85 Scenario: Even two point interpolation line with intermediate duplicated empty node
87 | osm | class | type | housenr | geometry |
88 | N1 | place | house | 2 | 1 1 |
89 | N2 | place | house | 10 | 1.001 1.001 |
91 | osm | class | type | addr+interpolation | geometry |
92 | W1 | place | houses | even | 1 1, 1 1.001, 1.001 1.001 |
97 Then W1 expands to interpolation
98 | start | end | geometry |
99 | 4 | 8 | 1 1.0005, 1 1.001, 1.0005 1.001 |
101 Scenario: Simple even three point interpolation line
103 | osm | class | type | housenr | geometry |
104 | N1 | place | house | 2 | 1 1 |
105 | N2 | place | house | 14 | 1.001 1.001 |
106 | N3 | place | house | 10 | 1 1.001 |
108 | osm | class | type | addr+interpolation | geometry |
109 | W1 | place | houses | even | 1 1, 1 1.001, 1.001 1.001 |
114 Then W1 expands to interpolation
115 | start | end | geometry |
116 | 4 | 8 | 1 1.00025, 1 1.00075 |
117 | 12 | 12 | 1.0005 1.001 |
119 Scenario: Simple even four point interpolation line
121 | osm | class | type | housenr | geometry |
122 | N1 | place | house | 2 | 1 1 |
123 | N2 | place | house | 14 | 1.001 1.001 |
124 | N3 | place | house | 10 | 1 1.001 |
125 | N4 | place | house | 18 | 1.001 1.002 |
127 | osm | class | type | addr+interpolation | geometry |
128 | W1 | place | houses | even | 1 1, 1 1.001, 1.001 1.001, 1.001 1.002 |
133 Then W1 expands to interpolation
134 | start | end | geometry |
135 | 4 | 8 | 1 1.00025, 1 1.00075 |
136 | 12 | 12 | 1.0005 1.001 |
137 | 16 | 16 | 1.001 1.0015 |
139 Scenario: Reverse simple even three point interpolation line
141 | osm | class | type | housenr | geometry |
142 | N1 | place | house | 2 | 1 1 |
143 | N2 | place | house | 14 | 1.001 1.001 |
144 | N3 | place | house | 10 | 1 1.001 |
146 | osm | class | type | addr+interpolation | geometry |
147 | W1 | place | houses | even | 1.001 1.001, 1 1.001, 1 1 |
152 Then W1 expands to interpolation
153 | start | end | geometry |
154 | 4 | 8 | 1 1.00025, 1 1.00075 |
155 | 12 | 12 | 1.0005 1.001 |
157 Scenario: Even three point interpolation line with odd center point
159 | osm | class | type | housenr | geometry |
160 | N1 | place | house | 2 | 1 1 |
161 | N2 | place | house | 8 | 1.001 1.001 |
162 | N3 | place | house | 7 | 1 1.001 |
164 | osm | class | type | addr+interpolation | geometry |
165 | W1 | place | houses | even | 1 1, 1 1.001, 1.001 1.001 |
170 Then W1 expands to interpolation
171 | start | end | geometry |
172 | 4 | 6 | 1 1.0004, 1 1.0008 |
174 Scenario: Interpolation line with self-intersecting way
176 | osm | class | type | housenr | geometry |
177 | N1 | place | house | 2 | 0 0 |
178 | N2 | place | house | 6 | 0 0.001 |
179 | N3 | place | house | 10 | 0 0.002 |
181 | osm | class | type | addr+interpolation | geometry |
182 | W1 | place | houses | even | 0 0, 0 0.001, 0 0.002, 0 0.001 |
187 Then W1 expands to interpolation
188 | start | end | geometry |
193 Scenario: Interpolation line with self-intersecting way II
195 | osm | class | type | housenr | geometry |
196 | N1 | place | house | 2 | 0 0 |
197 | N2 | place | house | 6 | 0 0.001 |
199 | osm | class | type | addr+interpolation | geometry |
200 | W1 | place | houses | even | 0 0, 0 0.001, 0 0.002, 0 0.001 |
205 Then W1 expands to interpolation
206 | start | end | geometry |
209 Scenario: addr:street on interpolation way
210 Given the scene parallel-road
212 | osm | class | type | housenr | geometry |
213 | N1 | place | house | 2 | :n-middle-w |
214 | N2 | place | house | 6 | :n-middle-e |
215 | N3 | place | house | 12 | :n-middle-w |
216 | N4 | place | house | 16 | :n-middle-e |
218 | osm | class | type | addr+interpolation | street | geometry |
219 | W10 | place | houses | even | | :w-middle |
220 | W11 | place | houses | even | Cloud Street | :w-middle |
222 | osm | class | type | name | geometry |
223 | W2 | highway | tertiary | Sun Way | :w-north |
224 | W3 | highway | tertiary | Cloud Street | :w-south |
227 | 10 | 1,100,101,102,2 |
228 | 11 | 3,200,201,202,4 |
231 | object | parent_place_id |
236 Then W10 expands to interpolation
237 | parent_place_id | start | end |
239 Then W11 expands to interpolation
240 | parent_place_id | start | end |
242 When sending search query "16 Cloud Street"
244 | ID | osm_type | osm_id |
246 When sending search query "14 Cloud Street"
248 | ID | osm_type | osm_id |
251 Scenario: addr:street on housenumber way
252 Given the scene parallel-road
254 | osm | class | type | housenr | street | geometry |
255 | N1 | place | house | 2 | | :n-middle-w |
256 | N2 | place | house | 6 | | :n-middle-e |
257 | N3 | place | house | 12 | Cloud Street | :n-middle-w |
258 | N4 | place | house | 16 | Cloud Street | :n-middle-e |
260 | osm | class | type | addr+interpolation | geometry |
261 | W10 | place | houses | even | :w-middle |
262 | W11 | place | houses | even | :w-middle |
264 | osm | class | type | name | geometry |
265 | W2 | highway | tertiary | Sun Way | :w-north |
266 | W3 | highway | tertiary | Cloud Street | :w-south |
269 | 10 | 1,100,101,102,2 |
270 | 11 | 3,200,201,202,4 |
273 | object | parent_place_id |
278 Then W10 expands to interpolation
279 | parent_place_id | start | end |
281 Then W11 expands to interpolation
282 | parent_place_id | start | end |
284 When sending search query "16 Cloud Street"
286 | ID | osm_type | osm_id |
288 When sending search query "14 Cloud Street"
290 | ID | osm_type | osm_id |
293 Scenario: Geometry of points and way don't match (github #253)
295 | osm | class | type | housenr | geometry |
296 | N1 | place | house | 10 | 144.9632341 -37.76163 |
297 | N2 | place | house | 6 | 144.9630541 -37.7628174 |
298 | N3 | shop | supermarket | 2 | 144.9629794 -37.7630755 |
300 | osm | class | type | addr+interpolation | geometry |
301 | W1 | place | houses | even | 144.9632341 -37.76163,144.9630541 -37.7628172,144.9629794 -37.7630755 |
306 Then W1 expands to interpolation
307 | start | end | geometry |
308 | 4 | 4 | 144.963016 -37.762946 |
309 | 8 | 8 | 144.963144 -37.7622237 |
311 Scenario: Place with missing address information
315 | osm | class | type | housenr |
316 | N1 | place | house | 23 |
317 | N2 | amenity | school | |
318 | N3 | place | house | 29 |
320 | osm | class | type | addr+interpolation | geometry |
321 | W1 | place | houses | odd | 1,2,3 |
326 Then W1 expands to interpolation
327 | start | end | geometry |
328 | 25 | 27 | 0.000016 0,0.00002 0,0.000033 0 |
330 Scenario: Ways without node entries are ignored
332 | osm | class | type | housenr | geometry |
333 | W1 | place | houses | even | 1 1, 1 1.001 |
335 Then W1 expands to no interpolation
337 Scenario: Ways without nodes without housenumbers are ignored
339 | osm | class | type | housenr | geometry |
340 | N1 | place | house | | 1 1 |
341 | N2 | place | house | | 1 1.001 |
342 | W1 | place | houses | even | 1 1, 1 1.001 |
344 Then W1 expands to no interpolation
346 Scenario: Two point interpolation starting at 0
348 | osm | class | type | housenr | geometry |
349 | N1 | place | house | 0 | 1 1 |
350 | N2 | place | house | 8 | 1 1.001 |
352 | osm | class | type | addr+interpolation | geometry |
353 | W1 | place | houses | even | 1 1, 1 1.001 |
358 Then W1 expands to interpolation
359 | start | end | geometry |
360 | 2 | 6 | 1 0002, 1 1.0008 |
361 When sending jsonv2 reverse coordinates 1,1
363 | ID | osm_type | osm_id | type | display_name |
364 | 0 | way | 1 | house | 0 |