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 |
19 | 2 | 6 | 1 1, 1 1.001 |
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 | 6 | 1 1.001 |
27 | osm | class | type | addr+interpolation | geometry |
28 | W1 | place | houses | even | 1 1.001, 1 1 |
33 Then W1 expands to interpolation
34 | start | end | geometry |
35 | 2 | 6 | 1 1, 1 1.001 |
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 | 1 | 11 | 1 1, 1 1.001 |
53 Scenario: Simple all two point interpolation
55 | osm | class | type | housenr | geometry |
56 | N1 | place | house | 1 | 1 1 |
57 | N2 | place | house | 3 | 1 1.001 |
59 | osm | class | type | addr+interpolation | geometry |
60 | W1 | place | houses | all | 1 1, 1 1.001 |
65 Then W1 expands to interpolation
66 | start | end | geometry |
67 | 1 | 3 | 1 1, 1 1.001 |
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 | 2 | 10 | 1 1, 1 1.001, 1.001 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 | 2 | 10 | 1 1, 1 1.001, 1.001 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 | 2 | 10 | 1 1, 1 1.001 |
117 | 10 | 14 | 1 1.001, 1.001 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 | 2 | 10 | 1 1, 1 1.001 |
136 | 10 | 14 | 1 1.001, 1.001 1.001 |
137 | 14 | 18 | 1.001 1.001, 1.001 1.002 |
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 | 2 | 10 | 1 1, 1 1.001 |
155 | 10 | 14 | 1 1.001, 1.001 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 | 2 | 7 | 1 1, 1 1.001 |
173 | 7 | 8 | 1 1.001, 1.001 1.001 |
175 Scenario: Interpolation line with self-intersecting way
177 | osm | class | type | housenr | geometry |
178 | N1 | place | house | 2 | 0 0 |
179 | N2 | place | house | 6 | 0 0.001 |
180 | N3 | place | house | 10 | 0 0.002 |
182 | osm | class | type | addr+interpolation | geometry |
183 | W1 | place | houses | even | 0 0, 0 0.001, 0 0.002, 0 0.001 |
188 Then W1 expands to interpolation
189 | start | end | geometry |
190 | 2 | 6 | 0 0, 0 0.001 |
191 | 6 | 10 | 0 0.001, 0 0.002 |
192 | 6 | 10 | 0 0.001, 0 0.002 |
194 Scenario: Interpolation line with self-intersecting way II
196 | osm | class | type | housenr | geometry |
197 | N1 | place | house | 2 | 0 0 |
198 | N2 | place | house | 6 | 0 0.001 |
200 | osm | class | type | addr+interpolation | geometry |
201 | W1 | place | houses | even | 0 0, 0 0.001, 0 0.002, 0 0.001 |
206 Then W1 expands to interpolation
207 | start | end | geometry |
208 | 2 | 6 | 0 0, 0 0.001 |
210 Scenario: addr:street on interpolation way
211 Given the scene parallel-road
213 | osm | class | type | housenr | geometry |
214 | N1 | place | house | 2 | :n-middle-w |
215 | N2 | place | house | 6 | :n-middle-e |
216 | N3 | place | house | 12 | :n-middle-w |
217 | N4 | place | house | 16 | :n-middle-e |
219 | osm | class | type | addr+interpolation | street | geometry |
220 | W10 | place | houses | even | | :w-middle |
221 | W11 | place | houses | even | Cloud Street | :w-middle |
223 | osm | class | type | name | geometry |
224 | W2 | highway | tertiary | Sun Way | :w-north |
225 | W3 | highway | tertiary | Cloud Street | :w-south |
228 | 10 | 1,100,101,102,2 |
229 | 11 | 3,200,201,202,4 |
232 | object | parent_place_id |
237 Then W10 expands to interpolation
238 | parent_place_id | start | end |
240 Then W11 expands to interpolation
241 | parent_place_id | start | end |
243 When searching for "16 Cloud Street"
245 | ID | osm_type | osm_id |
247 When searching for "14 Cloud Street"
249 | ID | osm_type | osm_id |
251 When searching for "18 Cloud Street"
253 | ID | osm_type | osm_id |
256 Scenario: addr:street on housenumber way
257 Given the scene parallel-road
259 | osm | class | type | housenr | street | geometry |
260 | N1 | place | house | 2 | | :n-middle-w |
261 | N2 | place | house | 6 | | :n-middle-e |
262 | N3 | place | house | 12 | Cloud Street | :n-middle-w |
263 | N4 | place | house | 16 | Cloud Street | :n-middle-e |
265 | osm | class | type | addr+interpolation | geometry |
266 | W10 | place | houses | even | :w-middle |
267 | W11 | place | houses | even | :w-middle |
269 | osm | class | type | name | geometry |
270 | W2 | highway | tertiary | Sun Way | :w-north |
271 | W3 | highway | tertiary | Cloud Street | :w-south |
274 | 10 | 1,100,101,102,2 |
275 | 11 | 3,200,201,202,4 |
278 | object | parent_place_id |
283 Then W10 expands to interpolation
284 | parent_place_id | start | end |
286 Then W11 expands to interpolation
287 | parent_place_id | start | end |
289 When searching for "16 Cloud Street"
291 | ID | osm_type | osm_id |
293 When searching for "14 Cloud Street"
295 | ID | osm_type | osm_id |
298 Scenario: Geometry of points and way don't match (github #253)
300 | osm | class | type | housenr | geometry |
301 | N1 | place | house | 10 | 144.9632341 -37.76163 |
302 | N2 | place | house | 6 | 144.9630541 -37.7628174 |
303 | N3 | shop | supermarket | 2 | 144.9629794 -37.7630755 |
305 | osm | class | type | addr+interpolation | geometry |
306 | W1 | place | houses | even | 144.9632341 -37.76163,144.9630541 -37.7628172,144.9629794 -37.7630755 |
311 Then W1 expands to interpolation
312 | start | end | geometry |
313 | 2 | 6 | 144.9629794 -37.7630755, 144.9630541 -37.7628174 |
314 | 6 | 10 | 144.9630541 -37.7628174, 144.9632341 -37.76163 |
316 Scenario: Place with missing address information
320 | osm | class | type | housenr |
321 | N1 | place | house | 23 |
322 | N2 | amenity | school | |
323 | N3 | place | house | 29 |
325 | osm | class | type | addr+interpolation | geometry |
326 | W1 | place | houses | odd | 1,2,3 |
331 Then W1 expands to interpolation
332 | start | end | geometry |
335 Scenario: Ways without node entries are ignored
337 | osm | class | type | housenr | geometry |
338 | W1 | place | houses | even | 1 1, 1 1.001 |
340 Then W1 expands to no interpolation
342 Scenario: Ways without nodes without housenumbers are ignored
344 | osm | class | type | housenr | geometry |
345 | N1 | place | house | | 1 1 |
346 | N2 | place | house | | 1 1.001 |
347 | W1 | place | houses | even | 1 1, 1 1.001 |
349 Then W1 expands to no interpolation