]> git.openstreetmap.org Git - nominatim.git/blob - test/bdd/features/db/query/interpolation.feature
prepare release 5.3.2.post2
[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 interpolations
15           | osm | type | geometry | nodes |
16           | W1  | odd  | 1,3      | 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         When importing
22         When reverse geocoding at node 2
23         Then the result contains
24           | display_name |
25           | 3, Nickway   |
26         When geocoding "Nickway 3"
27         Then all results contain
28           | object | display_name |
29           | W1     | 3, Nickway   |
30
31
32     Scenario: Find interpolations with multiple numbers
33         Given the places
34           | osm | class   | type    | name    | geometry |
35           | W10 | highway | primary | Nickway | 10,12,13 |
36         And the interpolations
37           | osm | type | geometry | nodes |
38           | W1  | even | 1,3      | 1,3   |
39         And the places
40           | osm | class | type  | housenr | geometry |
41           | N1  | place | house | 2       | 1        |
42           | N3  | place | house | 18      | 3        |
43         When importing
44         When reverse geocoding at node 2
45         Then the result contains
46           | display_name | centroid!wkt |
47           | 10, Nickway  | 2 |
48         When geocoding "Nickway 10"
49         Then all results contain
50           | object | display_name  | centroid!wkt |
51           | W1     | 10, Nickway   | 2 |
52
53
54     Scenario: Interpolations are found according to their type
55         Given the grid
56          | 10  |  | 11  |
57          | 100 |  | 101 |
58          | 20  |  | 21  |
59         And the places
60          | osm  | class   | type        | name    | geometry |
61          | W100 | highway | residential | Ringstr | 100, 101 |
62         And the interpolations
63          | osm | type | geometry | nodes |
64          | W10 | even | 10, 11   | 10, 11 |
65          | W20 | odd  | 20, 21   | 20, 21 |
66         And the places
67          | osm | class | type  | housenr | geometry |
68          | N10 | place | house | 10      | 10 |
69          | N11 | place | house | 20      | 11 |
70          | N20 | place | house | 11      | 20 |
71          | N21 | place | house | 21      | 21 |
72         When importing
73         When geocoding "Ringstr 12"
74         Then the result set contains
75          | object |
76          | W10 |
77         When geocoding "Ringstr 13"
78         Then the result set contains
79          | object |
80          | W20 |