]> git.openstreetmap.org Git - nominatim.git/blob - test/bdd/features/db/query/housenumbers.feature
release 5.1.0.post12
[nominatim.git] / test / bdd / features / db / query / housenumbers.feature
1 Feature: Searching of house numbers
2     Test for specialised treeatment of housenumbers
3
4     Background:
5         Given the grid
6          | 1 |   | 2 |   | 3 |
7          |   | 9 |   |   |   |
8          |   |   |   |   | 4 |
9
10
11     Scenario: A simple ascii digit housenumber is found
12         Given the places
13          | osm | class    | type | housenr  | geometry |
14          | N1  | building | yes  | 45       | 9        |
15         And the places
16          | osm | class   | type | name       | geometry |
17          | W10 | highway | path | North Road | 1,2,3    |
18         When importing
19         And geocoding "45, North Road"
20         Then the result set contains
21          | object |
22          | N1  |
23         When geocoding "North Road 45"
24         Then the result set contains
25          | object |
26          | N1  |
27
28
29     Scenario Outline: Numeral housenumbers in any script are found
30         Given the places
31          | osm | class    | type | housenr  | geometry |
32          | N1  | building | yes  | <number> | 9        |
33         And the places
34          | osm | class   | type | name       | geometry |
35          | W10 | highway | path | North Road | 1,2,3    |
36         When importing
37         And geocoding "45, North Road"
38         Then the result set contains
39          | object |
40          | N1  |
41         When geocoding "North Road ④⑤"
42         Then the result set contains
43          | object |
44          | N1  |
45         When geocoding "North Road 𑁪𑁫"
46         Then the result set contains
47          | object |
48          | N1  |
49
50     Examples:
51         | number |
52         | 45     |
53         | ④⑤     |
54         | 𑁪𑁫     |
55
56
57     Scenario Outline: Each housenumber in a list is found
58         Given the places
59          | osm | class    | type | housenr | geometry |
60          | N1  | building | yes  | <hnrs>  | 9        |
61         And the places
62          | osm | class   | type | name     | geometry |
63          | W10 | highway | path | Multistr | 1,2,3    |
64         When importing
65         When geocoding "2 Multistr"
66         Then the result set contains
67          | object |
68          | N1  |
69         When geocoding "4 Multistr"
70         Then the result set contains
71          | object |
72          | N1  |
73         When geocoding "12 Multistr"
74         Then the result set contains
75          | object |
76          | N1  |
77
78      Examples:
79         | hnrs |
80         | 2;4;12 |
81         | 2,4,12 |
82         | 2, 4, 12 |
83
84
85     Scenario Outline: Housenumber - letter combinations are found
86         Given the places
87          | osm | class    | type | housenr | geometry |
88          | N1  | building | yes  | <hnr>   | 9        |
89         And the places
90          | osm | class   | type | name     | geometry |
91          | W10 | highway | path | Multistr | 1,2,3    |
92         When importing
93         When geocoding "2A Multistr"
94         Then the result set contains
95          | object |
96          | N1  |
97         When geocoding "2 a Multistr"
98         Then the result set contains
99          | object |
100          | N1  |
101         When geocoding "2-A Multistr"
102         Then the result set contains
103          | object |
104          | N1  |
105         When geocoding "Multistr 2 A"
106         Then the result set contains
107          | object |
108          | N1  |
109
110     Examples:
111         | hnr |
112         | 2a  |
113         | 2 A |
114         | 2-a |
115         | 2/A |
116
117
118     Scenario Outline: Number - Number combinations as a housenumber are found
119         Given the places
120          | osm | class    | type | housenr | geometry |
121          | N1  | building | yes  | <hnr>   | 9        |
122         And the places
123          | osm | class   | type | name       | geometry |
124          | W10 | highway | path | Chester St | 1,2,3    |
125         When importing
126         When geocoding "34-10 Chester St"
127         Then the result set contains
128          | object |
129          | N1  |
130         When geocoding "34/10 Chester St"
131         Then the result set contains
132          | object |
133          | N1  |
134         When geocoding "34 10 Chester St"
135         Then the result set contains
136          | object |
137          | N1  |
138         When geocoding "3410 Chester St"
139         Then the result set contains
140          | object |
141          | W10 |
142
143     Examples:
144         | hnr   |
145         | 34-10 |
146         | 34 10 |
147         | 34/10 |
148
149
150     Scenario Outline: a bis housenumber is found
151         Given the places
152          | osm | class    | type | housenr | geometry |
153          | N1  | building | yes  | <hnr>   | 9        |
154         And the places
155          | osm | class   | type | name       | geometry |
156          | W10 | highway | path | Rue Paris | 1,2,3    |
157         When importing
158         When geocoding "Rue Paris 45bis"
159         Then the result set contains
160          | object |
161          | N1  |
162         When geocoding "Rue Paris 45 BIS"
163         Then the result set contains
164          | object |
165          | N1  |
166         When geocoding "Rue Paris 45BIS"
167         Then the result set contains
168          | object |
169          | N1  |
170         When geocoding "Rue Paris 45 bis"
171         Then the result set contains
172          | object |
173          | N1  |
174
175     Examples:
176         | hnr   |
177         | 45bis |
178         | 45BIS |
179         | 45 BIS |
180         | 45 bis |
181
182
183     Scenario Outline: a ter housenumber is found
184         Given the places
185          | osm | class    | type | housenr | geometry |
186          | N1  | building | yes  | <hnr>   | 9        |
187         And the places
188          | osm | class   | type | name       | geometry |
189          | W10 | highway | path | Rue du Berger | 1,2,3    |
190         When importing
191         When geocoding "Rue du Berger 45ter"
192         Then the result set contains
193          | object |
194          | N1  |
195         When geocoding "Rue du Berger 45 TER"
196         Then the result set contains
197          | object |
198          | N1  |
199         When geocoding "Rue du Berger 45TER"
200         Then the result set contains
201          | object |
202          | N1  |
203         When geocoding "Rue du Berger 45 ter"
204         Then the result set contains
205          | object |
206          | N1  |
207
208     Examples:
209         | hnr   |
210         | 45ter |
211         | 45TER |
212         | 45 ter |
213         | 45 TER |
214
215
216     Scenario Outline: a number - letter - number combination housenumber is found
217         Given the places
218          | osm | class    | type | housenr | geometry |
219          | N1  | building | yes  | <hnr>   | 9        |
220         And the places
221          | osm | class   | type | name       | geometry |
222          | W10 | highway | path | Herengracht | 1,2,3    |
223         When importing
224         When geocoding "501-H 1 Herengracht"
225         Then the result set contains
226          | object |
227          | N1  |
228         When geocoding "501H-1 Herengracht"
229         Then the result set contains
230          | object |
231          | N1  |
232         When geocoding "501H1 Herengracht"
233         Then the result set contains
234          | object |
235          | N1  |
236         When geocoding "501-H1 Herengracht"
237         Then the result set contains
238          | object |
239          | N1  |
240
241     Examples:
242         | hnr |
243         | 501 H1 |
244         | 501H 1 |
245         | 501/H/1 |
246         | 501h1 |
247
248
249     Scenario Outline: Russian housenumbers are found
250         Given the places
251          | osm | class    | type | housenr | geometry |
252          | N1  | building | yes  | <hnr>   | 9        |
253         And the places
254          | osm | class   | type | name       | geometry |
255          | W10 | highway | path | Голубинская улица | 1,2,3    |
256         When importing
257         When geocoding "Голубинская улица 55к3"
258         Then the result set contains
259          | object |
260          | N1  |
261         When geocoding "Голубинская улица 55 k3"
262         Then the result set contains
263          | object |
264          | N1  |
265         When geocoding "Голубинская улица 55 к-3"
266         Then the result set contains
267          | object |
268          | N1  |
269
270     Examples:
271         | hnr |
272         | 55к3 |
273         | 55 к3 |
274
275
276     Scenario: A name mapped as a housenumber is found
277         Given the places
278          | osm | class    | type | housenr | geometry |
279          | N1  | building | yes  | Warring | 9        |
280         And the places
281          | osm | class   | type | name       | geometry |
282          | W10 | highway | path | Chester St | 1,2,3    |
283         When importing
284         When geocoding "Chester St Warring"
285         Then the result set contains
286          | object |
287          | N1  |
288
289
290     Scenario: Interpolations are found according to their type
291         Given the grid
292          | 10  |  | 11  |
293          | 100 |  | 101 |
294          | 20  |  | 21  |
295         And the places
296          | osm  | class   | type        | name    | geometry |
297          | W100 | highway | residential | Ringstr | 100, 101 |
298         And the places
299          | osm | class | type   | addr+interpolation | geometry |
300          | W10 | place | houses | even               | 10, 11   |
301          | W20 | place | houses | odd                | 20, 21   |
302         And the places
303          | osm | class | type  | housenr | geometry |
304          | N10 | place | house | 10      | 10 |
305          | N11 | place | house | 20      | 11 |
306          | N20 | place | house | 11      | 20 |
307          | N21 | place | house | 21      | 21 |
308         And the ways
309          | id | nodes |
310          | 10 | 10, 11 |
311          | 20 | 20, 21 |
312         When importing
313         When geocoding "Ringstr 12"
314         Then the result set contains
315          | object |
316          | W10 |
317         When geocoding "Ringstr 13"
318         Then the result set contains
319          | object |
320          | W20 |