]> git.openstreetmap.org Git - nominatim.git/blob - test/bdd/api/reverse/queries.feature
search postcodes for highway areas around the area
[nominatim.git] / test / bdd / api / reverse / queries.feature
1 @SQLITE
2 @APIDB
3 Feature: Reverse geocoding
4     Testing the reverse function
5
6     Scenario Outline: Simple reverse-geocoding with no results
7         When sending v1/reverse at <lat>,<lon>
8         Then exactly 0 results are returned
9
10     Examples:
11      | lat      | lon |
12      | 0.0      | 0.0 |
13      | -34.830  | -56.105 |
14      | 45.174   | -103.072 |
15      | 21.156   | -12.2744 |
16      | 91.3     | 0.4    |
17      | -700     | 0.4    |
18      | 0.2      | 324.44 |
19      | 0.2      | -180.4 |
20
21
22     @Tiger
23     Scenario: TIGER house number
24         When sending v1/reverse at 32.4752389363,-86.4810198619
25         Then results contain
26           | category | type |
27           | place    | house |
28         And result addresses contain
29           | house_number | road                | postcode | country_code |
30           | 707          | Upper Kingston Road | 36067    | us |
31
32     @Tiger
33     Scenario: No TIGER house number for zoom < 18
34         When sending v1/reverse at 32.4752389363,-86.4810198619
35           | zoom |
36           | 17 |
37         Then results contain
38           | osm_type | category |
39           | way      | highway  |
40         And result addresses contain
41           | road                | postcode | country_code |
42           | Upper Kingston Road | 36067    | us |
43
44     Scenario: Interpolated house number
45         When sending v1/reverse at 47.118533,9.57056562
46         Then results contain
47           | osm_type | category | type |
48           | way      | place    | house |
49         And result addresses contain
50           | house_number | road |
51           | 1019         | Grosssteg |
52
53     Scenario: Address with non-numerical house number
54         When sending v1/reverse at 47.107465,9.52838521614
55         Then result addresses contain
56           | house_number | road |
57           | 39A/B        | Dorfstrasse |
58
59
60     Scenario: Address with numerical house number
61         When sending v1/reverse at 47.168440329479594,9.511551699184338
62         Then result addresses contain
63           | house_number | road |
64           | 6            | Schmedgässle |
65
66     Scenario Outline: Zoom levels below 5 result in country
67         When sending v1/reverse at 47.16,9.51
68          | zoom |
69          | <zoom> |
70         Then results contain
71          | display_name |
72          | Liechtenstein |
73
74     Examples:
75          | zoom |
76          | 0    |
77          | 1    |
78          | 2    |
79          | 3    |
80          | 4    |
81
82     Scenario: When on a street, the closest interpolation is shown
83         When sending v1/reverse at 47.118457166193245,9.570678289621355
84          | zoom |
85          | 18 |
86         Then results contain
87          | display_name |
88          | 1021, Grosssteg, Sücka, Triesenberg, Oberland, 9497, Liechtenstein |
89
90     # github 2214
91     Scenario: Interpolations do not override house numbers when they are closer
92         When sending v1/reverse at 47.11778,9.57255
93          | zoom |
94          | 18 |
95         Then results contain
96          | display_name |
97          | 5, Grosssteg, Steg, Triesenberg, Oberland, 9497, Liechtenstein |
98
99     Scenario: Interpolations do not override house numbers when they are closer (2)
100         When sending v1/reverse at 47.11834,9.57167
101          | zoom |
102          | 18 |
103         Then results contain
104          | display_name |
105          | 3, Grosssteg, Sücka, Triesenberg, Oberland, 9497, Liechtenstein |
106
107     Scenario: When on a street with zoom 18, the closest housenumber is returned
108         When sending v1/reverse at 47.11755503977281,9.572722250405036
109          | zoom |
110          | 18 |
111         Then result addresses contain
112          | house_number |
113          | 7 |