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