2 Feature: Geocodejson for Reverse API
3 Testing correctness of geocodejson output (API version v1).
5 Scenario Outline: Simple OSM result
6 When sending v1/reverse at 47.066,9.504 with format geocodejson
9 Then result has attributes place_id, accuracy
10 And result has <attributes> country,postcode,county,city,district,street,housenumber, admin
12 | osm_type | osm_id | osm_key | osm_value | type |
13 | node | 6522627624 | shop | bakery | house |
16 | Dorfbäckerei Herrmann | Dorfbäckerei Herrmann, 29, Gnetsch, Mäls, Balzers, Oberland, 9496, Liechtenstein |
17 And results contain in field geojson
18 | type | coordinates |
19 | Point | [9.5036065, 47.0660892] |
20 And results contain in field __geocoding
21 | version | licence | attribution |
22 | 0.1.0 | ODbL | Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright |
25 | has_address | attributes |
27 | 0 | not attributes |
30 Scenario: City housenumber-level address with street
31 When sending v1/reverse at 47.1068011,9.52810091 with format geocodejson
33 | housenumber | street | postcode | city | country |
34 | 8 | Im Winkel | 9495 | Triesen | Liechtenstein |
35 And results contain in field admin
37 | Oberland | Triesen |
40 Scenario: Town street-level address with street
41 When sending v1/reverse at 47.066,9.504 with format geocodejson
45 | name | city | postcode | country |
46 | Gnetsch | Balzers | 9496 | Liechtenstein |
49 Scenario: Poi street-level address with footway
50 When sending v1/reverse at 47.06515,9.50083 with format geocodejson
52 | street | city | postcode | country |
53 | Burgweg | Balzers | 9496 | Liechtenstein |
56 Scenario: City address with suburb
57 When sending v1/reverse at 47.146861,9.511771 with format geocodejson
59 | housenumber | street | district | city | postcode | country |
60 | 5 | Lochgass | Ebenholz | Vaduz | 9490 | Liechtenstein |
64 Scenario: Tiger address
65 When sending v1/reverse at 32.4752389363,-86.4810198619 with format geocodejson
67 | osm_type | osm_id | osm_key | osm_value | type |
68 | way | 396009653 | place | house | house |
70 | housenumber | street | city | county | postcode | country |
71 | 707 | Upper Kingston Road | Prattville | Autauga County | 36067 | United States |
74 Scenario: Interpolation address
75 When sending v1/reverse at 47.118533,9.57056562 with format geocodejson
77 | osm_type | osm_id | osm_key | osm_value | type |
78 | way | 1 | place | house | house |
81 | 1019, Grosssteg, Sücka, Triesenberg, Oberland, 9497, Liechtenstein |
82 And result has not attributes name
85 Scenario: Line geometry output is supported
86 When sending v1/reverse at 47.06597,9.50467 with format geocodejson
88 | polygon_geojson | 1 |
89 Then results contain in field geojson
94 Scenario Outline: Only geojson polygons are supported
95 When sending v1/reverse at 47.06597,9.50467 with format geocodejson
98 Then results contain in field geojson