3 Feature: Geocodejson for Reverse API
4 Testing correctness of geocodejson output (API version v1).
6 Scenario Outline: Simple OSM result
7 When sending v1/reverse at 47.066,9.504 with format geocodejson
10 Then result has attributes place_id, accuracy
11 And result has <attributes> country,postcode,county,city,district,street,housenumber, admin
13 | osm_type | osm_id | osm_key | osm_value | type |
14 | node | 6522627624 | shop | bakery | house |
17 | Dorfbäckerei Herrmann | Dorfbäckerei Herrmann, 29, Gnetsch, Mäls, Balzers, Oberland, 9496, Liechtenstein |
18 And results contain in field geojson
19 | type | coordinates |
20 | Point | [9.5036065, 47.0660892] |
21 And results contain in field __geocoding
22 | version | licence | attribution |
23 | 0.1.0 | ODbL | ^Data © OpenStreetMap contributors, ODbL 1.0. https?://osm.org/copyright$ |
26 | has_address | attributes |
28 | 0 | not attributes |
31 Scenario: City housenumber-level address with street
32 When sending v1/reverse at 47.1068011,9.52810091 with format geocodejson
34 | housenumber | street | postcode | city | country |
35 | 8 | Im Winkel | 9495 | Triesen | Liechtenstein |
36 And results contain in field admin
38 | Oberland | Triesen |
41 Scenario: Town street-level address with street
42 When sending v1/reverse at 47.066,9.504 with format geocodejson
46 | name | city | postcode | country |
47 | Gnetsch | Balzers | 9496 | Liechtenstein |
50 Scenario: Poi street-level address with footway
51 When sending v1/reverse at 47.06515,9.50083 with format geocodejson
53 | street | city | postcode | country |
54 | Burgweg | Balzers | 9496 | Liechtenstein |
57 Scenario: City address with suburb
58 When sending v1/reverse at 47.146861,9.511771 with format geocodejson
60 | housenumber | street | district | city | postcode | country |
61 | 5 | Lochgass | Ebenholz | Vaduz | 9490 | Liechtenstein |
65 Scenario: Tiger address
66 When sending v1/reverse at 32.4752389363,-86.4810198619 with format geocodejson
68 | osm_type | osm_id | osm_key | osm_value | type |
69 | way | 396009653 | place | house | house |
71 | housenumber | street | city | county | postcode | country |
72 | 707 | Upper Kingston Road | Prattville | Autauga County | 36067 | United States |
75 Scenario: Interpolation address
76 When sending v1/reverse at 47.118533,9.57056562 with format geocodejson
78 | osm_type | osm_id | osm_key | osm_value | type |
79 | way | 1 | place | house | house |
82 | 1019, Grosssteg, Sücka, Triesenberg, Oberland, 9497, Liechtenstein |
83 And result has not attributes name
86 Scenario: Line geometry output is supported
87 When sending v1/reverse at 47.06597,9.50467 with format geocodejson
89 | polygon_geojson | 1 |
90 Then results contain in field geojson
95 Scenario Outline: Only geojson polygons are supported
96 When sending v1/reverse at 47.06597,9.50467 with format geocodejson
99 Then results contain in field geojson