3 Feature: Json output for Reverse API
 
   4     Testing correctness of json and jsonv2 output (API version v1).
 
   6     Scenario Outline: OSM result with and without addresses
 
   7         When sending v1/reverse at 47.066,9.504 with format json
 
  10         Then result has <attributes> address
 
  11         When sending v1/reverse at 47.066,9.504 with format jsonv2
 
  14         Then result has <attributes> address
 
  17           | has_address | attributes     |
 
  19           | 0           | not attributes |
 
  21     Scenario Outline: Simple OSM result
 
  22         When sending v1/reverse at 47.066,9.504 with format <format>
 
  23         Then result has attributes place_id
 
  26           | ^Data © OpenStreetMap contributors, ODbL 1.0. https?://osm.org/copyright$ |
 
  31           | centroid             | boundingbox |
 
  32           | 9.5036065 47.0660892 | ['47.0660392', '47.0661392', '9.5035565', '9.5036565'] |
 
  35           | Dorfbäckerei Herrmann, 29, Gnetsch, Mäls, Balzers, Oberland, 9496, Liechtenstein |
 
  36         And result has not attributes namedetails,extratags
 
  43     Scenario: Extra attributes of jsonv2 result
 
  44         When sending v1/reverse at 47.066,9.504 with format jsonv2
 
  45         Then result has attributes importance
 
  47           | category | type   | name                  | place_rank | addresstype |
 
  48           | shop     | bakery | Dorfbäckerei Herrmann | 30         | shop        |
 
  52     Scenario: Tiger address
 
  53         When sending v1/reverse at 32.4752389363,-86.4810198619 with format jsonv2
 
  55          | osm_type | osm_id    | category | type  | addresstype  |
 
  56          | way      | 396009653 | place    | house | place        |
 
  59     Scenario Outline: Interpolation address
 
  60         When sending v1/reverse at 47.118533,9.57056562 with format <format>
 
  65           | centroid                | boundingbox |
 
  66           | 9.57054676 47.118545392 | ^\['47.118495\d*', '47.118595\d*', '9.570496\d*', '9.570596\d*'\] |
 
  69           | 1019, Grosssteg, Sücka, Triesenberg, Oberland, 9497, Liechtenstein |
 
  77     Scenario Outline: Output of geojson
 
  78        When sending v1/reverse at 47.06597,9.50467 with format <format>
 
  80           | polygon_geojson | 1     |
 
  81        Then results contain in field geojson
 
  82           | type       | coordinates |
 
  83           | LineString | [[9.5039353, 47.0657546], [9.5040437, 47.0657781], [9.5040808, 47.065787], [9.5054298, 47.0661407]] |
 
  91     Scenario Outline: Output of WKT
 
  92        When sending v1/reverse at 47.06597,9.50467 with format <format>
 
  97           | ^LINESTRING\(9.5039353 47.0657546, ?9.5040437 47.0657781, ?9.5040808 47.065787, ?9.5054298 47.0661407\) |
 
 105     Scenario Outline: Output of SVG
 
 106        When sending v1/reverse at 47.06597,9.50467 with format <format>
 
 111           | M 9.5039353 -47.0657546 L 9.5040437 -47.0657781 9.5040808 -47.065787 9.5054298 -47.0661407 |
 
 119     Scenario Outline: Output of KML
 
 120        When sending v1/reverse at 47.06597,9.50467 with format <format>
 
 125           | ^<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> |