]> git.openstreetmap.org Git - nominatim.git/blob - tests/features/api/reverse.feature
Merge remote-tracking branch 'upstream/master'
[nominatim.git] / tests / features / api / reverse.feature
1 Feature: Reverse geocoding
2     Testing the reverse function
3
4     # Make sure country is not overwritten by the postcode
5     Scenario: Country is returned
6         Given the request parameters
7           | accept-language
8           | de
9         When looking up coordinates 53.9788769,13.0830313
10         Then result addresses contain 
11          | ID | country
12          | 0  | Deutschland
13
14
15     Scenario: Boundingbox is returned
16         Given the request parameters
17           | format | zoom
18           | xml    | 4
19         When looking up coordinates 53.9788769,13.0830313
20         And results contain valid boundingboxes
21
22     Scenario: Reverse geocoding for odd interpolated housenumber
23
24     Scenario: Reverse geocoding for even interpolated housenumber
25
26     @Tiger
27     Scenario: TIGER house number
28         Given the request parameters
29           | addressdetails
30           | 1
31         When looking up jsonv2 coordinates 40.6863624710666,-112.060005720023
32         And exactly 1 result is returned
33         And result addresses contain
34           | ID | house_number | road               | postcode | country_code
35           | 0  | 709.         | Kings Estate Drive | 84128    | us
36         And results contain
37           | osm_type | category | type
38           | way      | place    | house
39
40     @Tiger
41     Scenario: No TIGER house number for zoom < 18
42         Given the request parameters
43           | addressdetails | zoom
44           | 1              | 17
45         When looking up coordinates 40.6863624710666,-112.060005720023
46         And exactly 1 result is returned
47         And result addresses contain
48           | ID | road               | postcode | country_code
49           | 0  | Kings Estate Drive | 84128    | us
50         And result 0 has attributes osm_id,osm_type
51
52    Scenario Outline: Reverse Geocoding with extratags
53         Given the request parameters
54           | extratags
55           | 1
56         When looking up <format> coordinates 48.86093,2.2978
57         Then result 0 has attributes extratags
58
59    Examples:
60         | format
61         | xml
62         | json
63         | jsonv2
64
65    Scenario Outline: Reverse Geocoding with namedetails
66         Given the request parameters
67           | namedetails
68           | 1
69         When looking up <format> coordinates 48.86093,2.2978
70         Then result 0 has attributes namedetails
71
72    Examples:
73         | format
74         | xml
75         | json
76         | jsonv2
77
78
79    Scenario Outline: Reverse Geocoding contains TEXT geometry
80         Given the request parameters
81           | polygon_text
82           | 1
83         When looking up <format> coordinates 48.86093,2.2978
84         Then result 0 has attributes <response_attribute>
85
86    Examples:
87         | format   | response_attribute
88         | xml      | geotext
89         | json     | geotext
90         | jsonv2   | geotext
91
92    Scenario Outline: Reverse Geocoding contains polygon-as-points geometry
93         Given the request parameters
94           | polygon
95           | 1
96         When looking up <format> coordinates 48.86093,2.2978
97         Then result 0 has not attributes <response_attribute>
98
99    Examples:
100         | format   | response_attribute
101         | xml      | polygonpoints
102         | json     | polygonpoints
103         | jsonv2   | polygonpoints
104
105
106
107    Scenario Outline: Reverse Geocoding contains SVG geometry
108         Given the request parameters
109           | polygon_svg
110           | 1
111         When looking up <format> coordinates 48.86093,2.2978
112         Then result 0 has attributes <response_attribute>
113
114    Examples:
115         | format   | response_attribute
116         | xml      | geosvg
117         | json     | svg
118         | jsonv2   | svg
119
120
121    Scenario Outline: Reverse Geocoding contains KML geometry
122         Given the request parameters
123           | polygon_kml
124           | 1
125         When looking up <format> coordinates 48.86093,2.2978
126         Then result 0 has attributes <response_attribute>
127
128    Examples:
129         | format   | response_attribute
130         | xml      | geokml
131         | json     | geokml
132         | jsonv2   | geokml
133
134
135    Scenario Outline: Reverse Geocoding contains GEOJSON geometry
136         Given the request parameters
137           | polygon_geojson
138           | 1
139         When looking up <format> coordinates 48.86093,2.2978
140         Then result 0 has attributes <response_attribute>
141
142    Examples:
143         | format   | response_attribute
144         | xml      | geojson
145         | json     | geojson
146         | jsonv2   | geojson
147
148