]> git.openstreetmap.org Git - nominatim.git/blob - test/bdd/api/reverse/params.feature
Add optional compilation of osm2pgsl
[nominatim.git] / test / bdd / api / reverse / params.feature
1 @APIDB
2 Feature: Parameters for Reverse API
3     Testing different parameter options for reverse API.
4
5     Scenario Outline: Reverse-geocoding without address
6         When sending <format> reverse coordinates 53.603,10.041
7           | addressdetails |
8           | 0 |
9         Then exactly 1 result is returned
10         And result has not attributes address
11
12     Examples:
13       | format |
14       | json |
15       | jsonv2 |
16       | geojson |
17       | xml |
18
19     Scenario Outline: Coordinates must be floating-point numbers
20         When sending reverse coordinates <coords>
21         Then a HTTP 400 is returned
22
23     Examples:
24       | coords    |
25       | -45.3,;   |
26       | gkjd,50   |
27
28     Scenario Outline: Reverse Geocoding with extratags
29         When sending <format> reverse coordinates 10.776234290950017,106.70425325632095
30           | extratags |
31           | 1 |
32         Then result 0 has attributes extratags
33
34     Examples:
35         | format |
36         | xml |
37         | json |
38         | jsonv2 |
39         | geojson |
40
41     Scenario Outline: Reverse Geocoding with namedetails
42         When sending <format> reverse coordinates 10.776455623137625,106.70175343751907
43           | namedetails |
44           | 1 |
45         Then result 0 has attributes namedetails
46
47     Examples:
48         | format |
49         | xml |
50         | json |
51         | jsonv2 |
52         | geojson |
53
54     Scenario Outline: Reverse Geocoding contains TEXT geometry
55         When sending <format> reverse coordinates 47.165989816710066,9.515774846076965
56           | polygon_text |
57           | 1 |
58         Then result 0 has attributes <response_attribute>
59
60     Examples:
61         | format   | response_attribute |
62         | xml      | geotext |
63         | json     | geotext |
64         | jsonv2   | geotext |
65
66     Scenario Outline: Reverse Geocoding contains polygon-as-points geometry
67         When sending <format> reverse coordinates 47.165989816710066,9.515774846076965
68           | polygon |
69           | 1 |
70         Then result 0 has not attributes <response_attribute>
71
72     Examples:
73         | format   | response_attribute |
74         | xml      | polygonpoints |
75         | json     | polygonpoints |
76         | jsonv2   | polygonpoints |
77
78     Scenario Outline: Reverse Geocoding contains SVG geometry
79         When sending <format> reverse coordinates 47.165989816710066,9.515774846076965
80           | polygon_svg |
81           | 1 |
82         Then result 0 has attributes <response_attribute>
83
84     Examples:
85         | format   | response_attribute |
86         | xml      | geosvg |
87         | json     | svg |
88         | jsonv2   | svg |
89
90     Scenario Outline: Reverse Geocoding contains KML geometry
91         When sending <format> reverse coordinates 47.165989816710066,9.515774846076965
92           | polygon_kml |
93           | 1 |
94         Then result 0 has attributes <response_attribute>
95
96     Examples:
97         | format   | response_attribute |
98         | xml      | geokml |
99         | json     | geokml |
100         | jsonv2   | geokml |
101
102     Scenario Outline: Reverse Geocoding contains GEOJSON geometry
103         When sending <format> reverse coordinates 47.165989816710066,9.515774846076965
104           | polygon_geojson |
105           | 1 |
106         Then result 0 has attributes <response_attribute>
107
108     Examples:
109         | format   | response_attribute |
110         | xml      | geojson |
111         | json     | geojson |
112         | jsonv2   | geojson |
113         | geojson  | geojson |
114
115     Scenario Outline: Reverse Geocoding in geojson format contains no non-geojson geometry
116         When sending geojson reverse coordinates 47.165989816710066,9.515774846076965
117           | polygon_text | polygon | polygon_svg | polygon_geokml |
118           | 1            | 1       | 1           | 1              |
119         Then result 0 has not attributes <response_attribute>
120
121     Examples:
122         | response_attribute |
123         | geotext            |
124         | polygonpoints      |
125         | svg                |
126         | geokml             |
127