1 Feature: Creation of search terms
2 Tests that search_name table is filled correctly
4 Scenario: Semicolon-separated names appear as separate full names
6 | osm | class | type | name+alt_name |
7 | N1 | place | city | New York; Big Apple |
8 | N2 | place | town | New York Big Apple |
10 And geocoding "New York Big Apple"
11 Then result 0 contains
15 Scenario: Comma-separated names appear as a single full name
17 | osm | class | type | name+name |
18 | N1 | place | city | New York, Big Apple |
19 | N2 | place | town | New York Big Apple |
21 And geocoding "New York Big Apple"
22 Then result 0 contains
26 Scenario: Name parts before brackets appear as full names
28 | osm | class | type | name+name |
29 | N1 | place | city | Halle (Saale) |
30 | N2 | place | town | Halle |
33 Then result 0 contains
36 When geocoding "Halle (Saale)"
37 Then the result set contains
41 Scenario: Unknown addr: tags can be found for unnamed POIs
46 | osm | class | type | housenr | addr+city |
47 | N1 | place | house | 23 | Walltown |
49 | osm | class | type | name+name | geometry |
50 | W1 | highway | residential | Rose Street | 10,11 |
52 When geocoding "23 Rose Street, Walltown"
53 Then the result set contains
54 | object | display_name |
55 | N1 | 23, Rose Street |
56 When geocoding "Walltown, Rose Street 23"
57 Then the result set contains
58 | object | display_name |
59 | N1 | 23, Rose Street |
60 When geocoding "Rose Street 23, Walltown"
61 Then the result set contains
62 | object | display_name |
63 | N1 | 23, Rose Street |
65 Scenario: Searching for unknown addr: tags also works for multiple words
70 | osm | class | type | housenr | addr+city |
71 | N1 | place | house | 23 | Little Big Town |
73 | osm | class | type | name+name | geometry |
74 | W1 | highway | residential | Rose Street | 10,11 |
76 When geocoding "23 Rose Street, Little Big Town"
77 Then the result set contains
78 | object | display_name |
79 | N1 | 23, Rose Street |
80 When geocoding "Rose Street 23, Little Big Town"
81 Then the result set contains
82 | object | display_name |
83 | N1 | 23, Rose Street |
84 When geocoding "Little big Town, Rose Street 23"
85 Then the result set contains
86 | object | display_name |
87 | N1 | 23, Rose Street |
89 Scenario: Unnamed POI can be found when it has known addr: tags
94 | osm | class | type | housenr | addr+city |
95 | N1 | place | house | 23 | Walltown |
97 | osm | class | type | name+name | addr+city | geometry |
98 | W1 | highway | residential | Rose Street | Walltown | 10,11 |
100 When geocoding "23 Rose Street, Walltown"
101 Then the result set contains
102 | object | display_name |
103 | N1 | 23, Rose Street |
105 Scenario: Unnamed POIs inherit parent name when unknown addr:place is present
107 | 100 | | | | | 101 |
109 | 103 | 10 | | | 11 | 102 |
111 | osm | class | type | housenr | addr+place |
112 | N1 | place | house | 23 | Walltown |
114 | osm | class | type | name+name | geometry |
115 | W1 | highway | residential | Rose Street | 10,11 |
116 | R1 | place | city | Strange Town | (100,101,102,103,100) |
119 | object | parent_place_id |
121 When geocoding "23 Rose Street"
122 Then all results contain
123 | object | display_name |
124 | W1 | Rose Street, Strange Town |
125 When geocoding "23 Walltown, Strange Town"
126 Then the result set contains
127 | object | display_name |
128 | N1 | 23, Walltown, Strange Town |
129 When geocoding "Walltown 23, Strange Town"
130 Then the result set contains
131 | object | display_name |
132 | N1 | 23, Walltown, Strange Town |
133 When geocoding "Strange Town, Walltown 23"
134 Then the result set contains
135 | object | display_name |
136 | N1 | 23, Walltown, Strange Town |
138 Scenario: Named POIs can be searched by housenumber when unknown addr:place is present
140 | 100 | | | | | 101 |
142 | 103 | 10 | | | 11 | 102 |
144 | osm | class | type | name | housenr | addr+place |
145 | N1 | place | house | Blue house | 23 | Walltown |
147 | osm | class | type | name+name | geometry |
148 | W1 | highway | residential | Rose Street | 10,11 |
149 | R1 | place | city | Strange Town | (100,101,102,103,100) |
151 When geocoding "23 Walltown, Strange Town"
152 Then the result set contains
153 | object | display_name |
154 | N1 | Blue house, 23, Walltown, Strange Town |
155 When geocoding "Walltown 23, Strange Town"
156 Then the result set contains
157 | object | display_name |
158 | N1 | Blue house, 23, Walltown, Strange Town |
159 When geocoding "Strange Town, Walltown 23"
160 Then the result set contains
161 | object | display_name |
162 | N1 | Blue house, 23, Walltown, Strange Town |
163 When geocoding "Strange Town, Walltown 23, Blue house"
164 Then the result set contains
165 | object | display_name |
166 | N1 | Blue house, 23, Walltown, Strange Town |
167 When geocoding "Strange Town, Walltown, Blue house"
168 Then the result set contains
169 | object | display_name |
170 | N1 | Blue house, 23, Walltown, Strange Town |
172 Scenario: Named POIs can be found when unknown multi-word addr:place is present
174 | 100 | | | | | 101 |
176 | 103 | 10 | | | 11 | 102 |
178 | osm | class | type | name | housenr | addr+place |
179 | N1 | place | house | Blue house | 23 | Moon sun |
181 | osm | class | type | name+name | geometry |
182 | W1 | highway | residential | Rose Street | 10,11 |
183 | R1 | place | city | Strange Town | (100,101,102,103,100) |
185 When geocoding "23 Moon Sun, Strange Town"
186 Then the result set contains
187 | object | display_name |
188 | N1 | Blue house, 23, Moon sun, Strange Town |
189 When geocoding "Blue house, Moon Sun, Strange Town"
190 Then the result set contains
191 | object | display_name |
192 | N1 | Blue house, 23, Moon sun, Strange Town |
194 Scenario: Unnamed POIs doesn't inherit parent name when addr:place is present only in parent address
196 | 100 | | | | | 101 |
198 | 103 | 10 | | | 11 | 102 |
200 | osm | class | type | housenr | addr+place |
201 | N1 | place | house | 23 | Walltown |
203 | osm | class | type | name+name | addr+city | geometry |
204 | W1 | highway | residential | Rose Street | Walltown | 10,11 |
205 | R1 | place | suburb | Strange Town | Walltown | (100,101,102,103,100) |
207 When geocoding "23 Rose Street, Walltown"
208 Then all results contain
209 | object | display_name |
210 | W1 | Rose Street, Strange Town |
211 When geocoding "23 Walltown"
212 Then all results contain
213 | object | display_name |
214 | N1 | 23, Walltown, Strange Town |
216 Scenario: Unnamed POIs does inherit parent name when unknown addr:place and addr:street is present
221 | osm | class | type | housenr | addr+place | addr+street |
222 | N1 | place | house | 23 | Walltown | Lily Street |
224 | osm | class | type | name+name | geometry |
225 | W1 | highway | residential | Rose Street | 10,11 |
227 When geocoding "23 Rose Street"
228 Then the result set contains
229 | object | display_name |
230 | N1 | 23, Rose Street |
231 When geocoding "23 Lily Street"
232 Then exactly 0 results are returned
234 Scenario: An unknown addr:street is ignored
239 | osm | class | type | housenr | addr+street |
240 | N1 | place | house | 23 | Lily Street |
242 | osm | class | type | name+name | geometry |
243 | W1 | highway | residential | Rose Street | 10,11 |
245 When geocoding "23 Rose Street"
246 Then the result set contains
247 | object | display_name |
248 | N1 | 23, Rose Street |
249 When geocoding "23 Lily Street"
250 Then exactly 0 results are returned
252 Scenario: Named POIs can be found through unknown address tags
257 | osm | class | type | name+name | housenr | addr+city |
258 | N1 | place | house | Green Moss | 26 | Walltown |
260 | osm | class | type | name+name | geometry |
261 | W1 | highway | residential | Rose Street | 10,11 |
263 When geocoding "Green Moss, Rose Street, Walltown"
264 Then the result set contains
265 | object | display_name |
266 | N1 | Green Moss, 26, Rose Street |
267 When geocoding "Green Moss, 26, Rose Street, Walltown"
268 Then the result set contains
269 | object | display_name |
270 | N1 | Green Moss, 26, Rose Street |
271 When geocoding "26, Rose Street, Walltown"
272 Then the result set contains
273 | object | display_name |
274 | N1 | Green Moss, 26, Rose Street |
275 When geocoding "Rose Street 26, Walltown"
276 Then the result set contains
277 | object | display_name |
278 | N1 | Green Moss, 26, Rose Street |
279 When geocoding "Walltown, Rose Street 26"
280 Then the result set contains
281 | object | display_name |
282 | N1 | Green Moss, 26, Rose Street |
284 Scenario: Named POI doesn't inherit parent name when addr:place is present only in parent address
286 | 100 | | | | | 101 |
288 | 103 | 10 | | | 11 | 102 |
290 | osm | class | type | name+name | addr+place |
291 | N1 | place | house | Green Moss | Walltown |
293 | osm | class | type | name+name | geometry |
294 | W1 | highway | residential | Rose Street | 10,11 |
295 | R1 | place | suburb | Strange Town | (100,101,102,103,100) |
297 When geocoding "Green Moss, Rose Street, Walltown"
298 Then exactly 0 results are returned
299 When geocoding "Green Moss, Walltown"
300 Then the result set contains
301 | object | display_name |
302 | N1 | Green Moss, Walltown, Strange Town |
304 Scenario: Named POIs inherit address from parent
309 | osm | class | type | name | geometry |
310 | N1 | place | house | foo | 1 |
311 | W1 | highway | residential | the road | 10,11 |
313 When geocoding "foo, the road"
314 Then all results contain
318 Scenario: Some addr: tags are added to address
323 | osm | class | type | name |
324 | N2 | place | city | bonn |
325 | N3 | place | suburb | smalltown|
327 | osm | class | type | name | addr+city | addr+municipality | addr+suburb | geometry |
328 | W1 | highway | service | the end | bonn | New York | Smalltown | 10,11 |
330 When geocoding "the end, new york, bonn, smalltown"
331 Then all results contain
335 Scenario: A known addr:* tag is added even if the name is unknown
339 | osm | class | type | name | addr+city | geometry |
340 | W1 | highway | residential | Road | Nandu | 10,11 |
342 And geocoding "Road, Nandu"
343 Then all results contain
347 Scenario: a linked place does not show up in search name
353 | osm | class | type | name | admin | geometry |
354 | R13 | boundary | administrative | Roma | 9 | (10,11,12,13,10) |
356 | osm | class | type | name |
357 | N2 | place | city | Cite |
359 | id | members | tags+type |
360 | 13 | N2:label | boundary |
363 | object | linked_place_id |
365 When geocoding "Cite"
366 Then all results contain
370 Scenario: a linked waterway does not show up in search name
374 | osm | class | type | name | geometry |
375 | W1 | waterway | river | Rhein | 1,2 |
376 | W2 | waterway | river | Rhein | 2,3 |
377 | R13 | waterway | river | Rhein | 1,2,3 |
379 | id | members | tags+type |
380 | 13 | W1,W2:main_stream | waterway |
383 | object | linked_place_id |
386 When geocoding "Rhein"
387 Then all results contain