2 Feature: Json output for Reverse API
3 Testing correctness of json and jsonv2 output (API version v1).
5 Scenario Outline: OSM result with and without addresses
6 When sending v1/reverse at 47.066,9.504 with format json
9 Then result has <attributes> address
10 When sending v1/reverse at 47.066,9.504 with format jsonv2
13 Then result has <attributes> address
16 | has_address | attributes |
18 | 0 | not attributes |
20 Scenario Outline: Siple OSM result
21 When sending v1/reverse at 47.066,9.504 with format <format>
22 Then result has attributes place_id
25 | Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright |
30 | centroid | boundingbox |
31 | 9.5036065 47.0660892 | ['47.0660392', '47.0661392', '9.5035565', '9.5036565'] |
34 | Dorfbäckerei Herrmann, 29, Gnetsch, Mäls, Balzers, Oberland, 9496, Liechtenstein |
35 And result has not attributes namedetails,extratags
42 Scenario: Extra attributes of jsonv2 result
43 When sending v1/reverse at 47.066,9.504 with format jsonv2
44 Then result has attributes importance
46 | category | type | name | place_rank | addresstype |
47 | shop | bakery | Dorfbäckerei Herrmann | 30 | shop |
51 Scenario: Tiger address
52 When sending v1/reverse at 32.4752389363,-86.4810198619 with format jsonv2
54 | osm_type | osm_id | category | type | addresstype |
55 | way | 396009653 | place | house | place |
58 Scenario Outline: Interpolation address
59 When sending v1/reverse at 47.118533,9.57056562 with format <format>
64 | centroid | boundingbox |
65 | 9.57054676 47.118545392 | ['47.118495392', '47.118595392', '9.57049676', '9.57059676'] |
68 | 1019, Grosssteg, Sücka, Triesenberg, Oberland, 9497, Liechtenstein |
76 Scenario Outline: Output of geojson
77 When sending v1/reverse at 47.06597,9.50467 with format <format>
79 | polygon_geojson | 1 |
80 Then results contain in field geojson
81 | type | coordinates |
82 | LineString | [[9.5039353, 47.0657546], [9.5040437, 47.0657781], [9.5040808, 47.065787], [9.5054298, 47.0661407]] |
90 Scenario Outline: Output of WKT
91 When sending v1/reverse at 47.06597,9.50467 with format <format>
96 | LINESTRING(9.5039353 47.0657546,9.5040437 47.0657781,9.5040808 47.065787,9.5054298 47.0661407) |
104 Scenario Outline: Output of SVG
105 When sending v1/reverse at 47.06597,9.50467 with format <format>
110 | M 9.5039353 -47.0657546 L 9.5040437 -47.0657781 9.5040808 -47.065787 9.5054298 -47.0661407 |
118 Scenario Outline: Output of KML
119 When sending v1/reverse at 47.06597,9.50467 with format <format>
124 | ^<LineString><coordinates>9.5039\d*,47.0657\d* 9.5040\d*,47.0657\d* 9.5040\d*,47.065\d* 9.5054\d*,47.0661\d*</coordinates></LineString> |