]> git.openstreetmap.org Git - nominatim.git/blob - test/bdd/db/query/interpolation.feature
bdd: remove special case for osm_type field
[nominatim.git] / test / bdd / db / query / interpolation.feature
1 @DB
2 Feature: Query of address interpolations
3     Tests that interpolated addresses can be queried correctly
4
5     Background:
6         Given the grid
7           | 1  |  | 2  |  | 3  |
8           | 10 |  | 12 |  | 13 |
9           | 7  |  | 8  |  | 9  |
10
11     Scenario: Find interpolations with single number
12         Given the places
13           | osm | class   | type    | name    | geometry |
14           | W10 | highway | primary | Nickway | 10,12,13 |
15         And the places
16           | osm | class | type   | addr+interpolation | geometry |
17           | W1  | place | houses | odd                | 1,3      |
18         And the places
19           | osm | class | type  | housenr | geometry |
20           | N1  | place | house | 1       | 1        |
21           | N3  | place | house | 5       | 3        |
22         And the ways
23           | id | nodes |
24           | 1  | 1,3   |
25         When importing
26         When sending jsonv2 reverse point 2
27         Then results contain
28           | ID | display_name |
29           | 0  | 3, Nickway   |
30         When sending search query "Nickway 3"
31         Then results contain
32           | osm | display_name |
33           | W1  | 3, Nickway   |
34
35
36     Scenario: Find interpolations with multiple numbers
37         Given the places
38           | osm | class   | type    | name    | geometry |
39           | W10 | highway | primary | Nickway | 10,12,13 |
40         And the places
41           | osm | class | type   | addr+interpolation | geometry |
42           | W1  | place | houses | even               | 1,3      |
43         And the places
44           | osm | class | type  | housenr | geometry |
45           | N1  | place | house | 2       | 1        |
46           | N3  | place | house | 18      | 3        |
47         And the ways
48           | id | nodes |
49           | 1  | 1,3   |
50         When importing
51         When sending jsonv2 reverse point 2
52         Then results contain
53           | ID | display_name | centroid |
54           | 0  | 10, Nickway  | 2 |
55         When sending search query "Nickway 10"
56         Then results contain
57           | osm | display_name  | centroid |
58           | W1  | 10, Nickway   | 2 |