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 |
10 | W1 | place | houses | even | 1 1, 1 1.001 |
15 Then W1 expands to interpolation
16 | start | end | geometry |
17 | 2 | 6 | 1 1, 1 1.001 |
19 Scenario: Backwards even two point interpolation line
21 | osm | class | type | housenr | geometry |
22 | N1 | place | house | 2 | 1 1 |
23 | N2 | place | house | 6 | 1 1.001 |
24 | W1 | place | houses | even | 1 1.001, 1 1 |
29 Then W1 expands to interpolation
30 | start | end | geometry |
31 | 2 | 6 | 1 1, 1 1.001 |
33 Scenario: Simple odd two point interpolation
35 | osm | class | type | housenr | geometry |
36 | N1 | place | house | 1 | 1 1 |
37 | N2 | place | house | 11 | 1 1.001 |
38 | W1 | place | houses | odd | 1 1, 1 1.001 |
43 Then W1 expands to interpolation
44 | start | end | geometry |
45 | 1 | 11 | 1 1, 1 1.001 |
47 Scenario: Simple all two point interpolation
49 | osm | class | type | housenr | geometry |
50 | N1 | place | house | 1 | 1 1 |
51 | N2 | place | house | 3 | 1 1.001 |
52 | W1 | place | houses | all | 1 1, 1 1.001 |
57 Then W1 expands to interpolation
58 | start | end | geometry |
59 | 1 | 3 | 1 1, 1 1.001 |
61 Scenario: Even two point interpolation line with intermediate empty node
63 | osm | class | type | housenr | geometry |
64 | N1 | place | house | 2 | 1 1 |
65 | N2 | place | house | 10 | 1.001 1.001 |
66 | W1 | place | houses | even | 1 1, 1 1.001, 1.001 1.001 |
71 Then W1 expands to interpolation
72 | start | end | geometry |
73 | 2 | 10 | 1 1, 1 1.001, 1.001 1.001 |
75 Scenario: Even two point interpolation line with intermediate duplicated empty node
77 | osm | class | type | housenr | geometry |
78 | N1 | place | house | 2 | 1 1 |
79 | N2 | place | house | 10 | 1.001 1.001 |
80 | W1 | place | houses | even | 1 1, 1 1.001, 1.001 1.001 |
85 Then W1 expands to interpolation
86 | start | end | geometry |
87 | 2 | 10 | 1 1, 1 1.001, 1.001 1.001 |
89 Scenario: Simple even three point interpolation line
91 | osm | class | type | housenr | geometry |
92 | N1 | place | house | 2 | 1 1 |
93 | N2 | place | house | 14 | 1.001 1.001 |
94 | N3 | place | house | 10 | 1 1.001 |
95 | W1 | place | houses | even | 1 1, 1 1.001, 1.001 1.001 |
100 Then W1 expands to interpolation
101 | start | end | geometry |
102 | 2 | 10 | 1 1, 1 1.001 |
103 | 10 | 14 | 1 1.001, 1.001 1.001 |
105 Scenario: Simple even four point interpolation line
107 | osm | class | type | housenr | geometry |
108 | N1 | place | house | 2 | 1 1 |
109 | N2 | place | house | 14 | 1.001 1.001 |
110 | N3 | place | house | 10 | 1 1.001 |
111 | N4 | place | house | 18 | 1.001 1.002 |
112 | W1 | place | houses | even | 1 1, 1 1.001, 1.001 1.001, 1.001 1.002 |
117 Then W1 expands to interpolation
118 | start | end | geometry |
119 | 2 | 10 | 1 1, 1 1.001 |
120 | 10 | 14 | 1 1.001, 1.001 1.001 |
121 | 14 | 18 | 1.001 1.001, 1.001 1.002 |
123 Scenario: Reverse simple even three point interpolation line
125 | osm | class | type | housenr | geometry |
126 | N1 | place | house | 2 | 1 1 |
127 | N2 | place | house | 14 | 1.001 1.001 |
128 | N3 | place | house | 10 | 1 1.001 |
129 | W1 | place | houses | even | 1.001 1.001, 1 1.001, 1 1 |
134 Then W1 expands to interpolation
135 | start | end | geometry |
136 | 2 | 10 | 1 1, 1 1.001 |
137 | 10 | 14 | 1 1.001, 1.001 1.001 |
139 Scenario: Even three point interpolation line with odd center point
141 | osm | class | type | housenr | geometry |
142 | N1 | place | house | 2 | 1 1 |
143 | N2 | place | house | 8 | 1.001 1.001 |
144 | N3 | place | house | 7 | 1 1.001 |
145 | W1 | place | houses | even | 1 1, 1 1.001, 1.001 1.001 |
150 Then W1 expands to interpolation
151 | start | end | geometry |
152 | 2 | 7 | 1 1, 1 1.001 |
153 | 7 | 8 | 1 1.001, 1.001 1.001 |
155 Scenario: Interpolation line with self-intersecting way
157 | osm | class | type | housenr | geometry |
158 | N1 | place | house | 2 | 0 0 |
159 | N2 | place | house | 6 | 0 0.001 |
160 | N3 | place | house | 10 | 0 0.002 |
161 | W1 | place | houses | even | 0 0, 0 0.001, 0 0.002, 0 0.001 |
166 Then W1 expands to interpolation
167 | start | end | geometry |
168 | 2 | 6 | 0 0, 0 0.001 |
169 | 6 | 10 | 0 0.001, 0 0.002 |
170 | 6 | 10 | 0 0.001, 0 0.002 |
172 Scenario: Interpolation line with self-intersecting way II
174 | osm | class | type | housenr | geometry |
175 | N1 | place | house | 2 | 0 0 |
176 | N2 | place | house | 6 | 0 0.001 |
177 | W1 | place | houses | even | 0 0, 0 0.001, 0 0.002, 0 0.001 |
182 Then W1 expands to interpolation
183 | start | end | geometry |
184 | 2 | 6 | 0 0, 0 0.001 |
186 Scenario: addr:street on interpolation way
187 Given the scene parallel-road
189 | osm | class | type | housenr | geometry |
190 | N1 | place | house | 2 | :n-middle-w |
191 | N2 | place | house | 6 | :n-middle-e |
192 | N3 | place | house | 12 | :n-middle-w |
193 | N4 | place | house | 16 | :n-middle-e |
195 | osm | class | type | housenr | street | geometry |
196 | W10 | place | houses | even | | :w-middle |
197 | W11 | place | houses | even | Cloud Street | :w-middle |
199 | osm | class | type | name | geometry |
200 | W2 | highway | tertiary | Sun Way | :w-north |
201 | W3 | highway | tertiary | Cloud Street | :w-south |
204 | 10 | 1,100,101,102,2 |
205 | 11 | 3,200,201,202,4 |
208 | object | parent_place_id |
213 Then W10 expands to interpolation
214 | parent_place_id | start | end |
216 Then W11 expands to interpolation
217 | parent_place_id | start | end |
219 When searching for "16 Cloud Street"
221 | ID | osm_type | osm_id |
223 When searching for "14 Cloud Street"
225 | ID | osm_type | osm_id |
227 When searching for "18 Cloud Street"
229 | ID | osm_type | osm_id |
232 Scenario: addr:street on housenumber way
233 Given the scene parallel-road
235 | osm | class | type | housenr | street | geometry |
236 | N1 | place | house | 2 | | :n-middle-w |
237 | N2 | place | house | 6 | | :n-middle-e |
238 | N3 | place | house | 12 | Cloud Street | :n-middle-w |
239 | N4 | place | house | 16 | Cloud Street | :n-middle-e |
241 | osm | class | type | housenr | geometry |
242 | W10 | place | houses | even | :w-middle |
243 | W11 | place | houses | even | :w-middle |
245 | osm | class | type | name | geometry |
246 | W2 | highway | tertiary | Sun Way | :w-north |
247 | W3 | highway | tertiary | Cloud Street | :w-south |
250 | 10 | 1,100,101,102,2 |
251 | 11 | 3,200,201,202,4 |
254 | object | parent_place_id |
259 Then W10 expands to interpolation
260 | parent_place_id | start | end |
262 Then W11 expands to interpolation
263 | parent_place_id | start | end |
265 When searching for "16 Cloud Street"
267 | ID | osm_type | osm_id |
269 When searching for "14 Cloud Street"
271 | ID | osm_type | osm_id |
274 Scenario: Geometry of points and way don't match (github #253)
276 | osm | class | type | housenr | geometry |
277 | N1 | place | house | 10 | 144.9632341 -37.76163 |
278 | N2 | place | house | 6 | 144.9630541 -37.7628174 |
279 | N3 | shop | supermarket | 2 | 144.9629794 -37.7630755 |
280 | W1 | place | houses | even | 144.9632341 -37.76163,144.9630541 -37.7628172,144.9629794 -37.7630755 |
285 Then W1 expands to interpolation
286 | start | end | geometry |
287 | 2 | 6 | 144.9629794 -37.7630755, 144.9630541 -37.7628174 |
288 | 6 | 10 | 144.9630541 -37.7628174, 144.9632341 -37.76163 |
290 Scenario: Place with missing address information
292 | osm | class | type | housenr | geometry |
293 | N1 | place | house | 23 | 0.0001 0.0001 |
294 | N2 | amenity | school | | 0.0001 0.0002 |
295 | N3 | place | house | 29 | 0.0001 0.0004 |
296 | W1 | place | houses | odd | 0.0001 0.0001,0.0001 0.0002,0.0001 0.0004 |
301 Then W1 expands to interpolation
302 | start | end | geometry |
303 | 23 | 29 | 0.0001 0.0001, 0.0001 0.0002, 0.0001 0.0004 |