]> git.openstreetmap.org Git - nominatim.git/blob - test/bdd/api/reverse/queries.feature
make sure that all postcodes have an entry in word
[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 45.3345,-97.5214
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           | 909          | West 1st Street | 57274    | us |
14
15     @Tiger
16     Scenario: No TIGER house number for zoom < 18
17         When sending jsonv2 reverse coordinates 45.3345,-97.5214
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           | West 1st Street | 57274    | us |
26
27     Scenario: Interpolated house number
28         When sending jsonv2 reverse coordinates -33.231795578514635,-54.38682173844428
29         Then results contain
30           | osm_type | category | type |
31           | way      | place    | house |
32         And result addresses contain
33           | house_number | road |
34           | 1416         | Juan Antonio Lavalleja |
35
36     Scenario: Address with non-numerical house number
37         When sending jsonv2 reverse coordinates 53.579805460944,9.9475670458196
38         Then result addresses contain
39           | house_number | road |
40           | 43 Haus 4    | Stellinger Weg |
41
42
43     Scenario: Address with numerical house number
44         When sending jsonv2 reverse coordinates 53.580206752486,9.9502944945198
45         Then result addresses contain
46           | house_number | road |
47           | 5            | Clasingstraße |
48
49     Scenario: Location off the coast
50         When sending jsonv2 reverse coordinates 54.046489113,8.5546870529
51         Then results contain
52          | display_name |
53          | Hamburg, Deutschland |
54
55     Scenario: When slightly outside town, the town is not shown
56         When sending jsonv2 reverse coordinates -32.122,-56.114
57          | zoom |
58          | 15 |
59         Then results contain
60          | display_name |
61          | Tacuarembó, Uruguay |
62
63     Scenario Outline: Zoom levels below 5 result in country
64         When sending jsonv2 reverse coordinates -33.28,-56.29
65          | zoom |
66          | <zoom> |
67         Then results contain
68          | display_name |
69          | Uruguay |
70
71     Examples:
72          | zoom |
73          | 0    |
74          | 1    |
75          | 2    |
76          | 3    |
77          | 4    |
78
79     Scenario: When on a street, the closest interpolation is shown
80         When sending jsonv2 reverse coordinates -33.2309430210215,-54.38126470020989
81          | zoom |
82          | 18 |
83         Then results contain
84          | display_name |
85          | 1429, Andrés Areguati, Treinta y Tres, 33000, Uruguay |
86
87     Scenario: When on a street with zoom 18, the closest housenumber is returned
88         When sending jsonv2 reverse coordinates 53.551826690895226,9.885258475318201
89          | zoom |
90          | 18 |
91         Then result addresses contain
92          | house_number |
93          | 33 |