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