1 Feature: Geocodejson for Reverse API
2 Testing correctness of geocodejson output (API version v1).
4 Scenario Outline: Reverse geocodejson - Simple with no results
5 When sending v1/reverse with format geocodejson
8 Then a HTTP 200 is returned
9 And the result is valid json
10 And the result contains
22 Scenario Outline: Reverse geocodejson - Simple OSM result
23 When sending v1/reverse with format geocodejson
24 | lat | lon | addressdetails |
25 | 47.066 | 9.504 | <has_address> |
26 Then a HTTP 200 is returned
27 And the result is valid geocodejson with 1 result
28 And the result metadata contains
29 | version | licence | attribution!fm |
30 | 0.1.0 | ODbL | Data © OpenStreetMap contributors, ODbL 1.0. https?://osm.org/copyright |
31 And all results have <attributes> country,postcode,county,city,district,street,housenumber,admin
32 And all results contain
35 | osm_id | 6522627624 |
37 | osm_value | bakery |
39 | name | Dorfbäckerei Herrmann |
40 | label | Dorfbäckerei Herrmann, 29, Gnetsch, Mäls, Balzers, Oberland, 9496, Liechtenstein |
41 | geojson+type | Point |
42 | geojson+coordinates | [9.5036065, 47.0660892] |
45 | has_address | attributes |
49 Scenario: Reverse geocodejson - City housenumber-level address with street
50 When sending v1/reverse with format geocodejson
52 | 47.1068011 | 9.52810091 |
53 Then a HTTP 200 is returned
54 And the result is valid geocodejson with 1 result
55 And all results contain
56 | housenumber | street | postcode | city | country |
57 | 8 | Im Winkel | 9495 | Triesen | Liechtenstein |
58 And all results contain
59 | admin+level6 | admin+level8 |
60 | Oberland | Triesen |
62 Scenario: Reverse geocodejson - Town street-level address with street
63 When sending v1/reverse with format geocodejson
65 | 47.066 | 9.504 | 16 |
66 Then a HTTP 200 is returned
67 And the result is valid geocodejson with 1 result
68 And all results contain
69 | name | city | postcode | country |
70 | Gnetsch | Balzers | 9496 | Liechtenstein |
72 Scenario: Reverse geocodejson - Poi street-level address with footway
73 When sending v1/reverse with format geocodejson
75 | 47.06515 | 9.50083 |
76 Then a HTTP 200 is returned
77 And the result is valid geocodejson with 1 result
78 And all results contain
79 | street | city | postcode | country |
80 | Burgweg | Balzers | 9496 | Liechtenstein |
82 Scenario: Reverse geocodejson - City address with suburb
83 When sending v1/reverse with format geocodejson
85 | 47.146861 | 9.511771 |
86 Then a HTTP 200 is returned
87 And the result is valid geocodejson with 1 result
88 And all results contain
89 | housenumber | street | district | city | postcode | country |
90 | 5 | Lochgass | Ebenholz | Vaduz | 9490 | Liechtenstein |
92 Scenario: Reverse geocodejson - Tiger address
93 When sending v1/reverse with format geocodejson
95 | 32.4752389363 | -86.4810198619 |
96 Then a HTTP 200 is returned
97 And the result is valid geocodejson with 1 result
98 And all results contain
99 | osm_type | osm_id | osm_key | osm_value | type |
100 | way | 396009653 | place | house | house |
101 And all results contain
102 | housenumber | street | city | county | postcode | country |
103 | 707 | Upper Kingston Road | Prattville | Autauga County | 36067 | United States |
105 Scenario: Reverse geocodejson - Interpolation address
106 When sending v1/reverse with format geocodejson
108 | 47.118533 | 9.57056562 |
109 Then a HTTP 200 is returned
110 And the result is valid geocodejson with 1 result
111 And all results contain
112 | osm_type | osm_id | osm_key | osm_value | type |
113 | way | 1 | place | house | house |
114 And all results contain
116 | 1019, Grosssteg, Sücka, Triesenberg, Oberland, 9497, Liechtenstein |
117 And all results have no attributes name
119 Scenario: Reverse geocodejson - Line geometry output is supported
120 When sending v1/reverse with format geocodejson
121 | lat | lon | polygon_geojson |
122 | 47.06597 | 9.50467 | 1 |
123 Then a HTTP 200 is returned
124 And the result is valid geocodejson with 1 result
125 And all results contain
129 Scenario Outline: Reverse geocodejson - Only geojson polygons are supported
130 When sending v1/reverse with format geocodejson
131 | lat | lon | <param> |
132 | 47.06597 | 9.50467 | 1 |
133 Then a HTTP 200 is returned
134 And the result is valid geocodejson with 1 result
135 And all results contain