1 Feature: Geojson for Reverse API
 
   2     Testing correctness of geojson output (API version v1).
 
   4     Scenario Outline: Reverse geojson - Simple with no results
 
   5         When sending v1/reverse with format geojson
 
   8         Then a HTTP 200 is returned
 
   9         And the result is valid json
 
  10         And the result contains
 
  22     Scenario Outline: Reverse geojson - Simple OSM result
 
  23         When sending v1/reverse with format geojson
 
  24           | lat    | lon   | addressdetails |
 
  25           | 47.066 | 9.504 | <has_address>  |
 
  26         Then a HTTP 200 is returned
 
  27         And the result is valid geojson with 1 result
 
  28         And the result metadata contains
 
  30           | Data © OpenStreetMap contributors, ODbL 1.0. http://osm.org/copyright |
 
  31         And all results have attributes place_id, importance
 
  32         And all results have <attributes> address
 
  33         And all results contain
 
  36           | osm_id              | 6522627624 |
 
  40           | addresstype         | shop |
 
  41           | name                | Dorfbäckerei Herrmann |
 
  42           | display_name        | Dorfbäckerei Herrmann, 29, Gnetsch, Mäls, Balzers, Oberland, 9496, Liechtenstein |
 
  43           | boundingbox         | [47.0660392, 47.0661392, 9.5035565, 9.5036565] |
 
  44           | geojson+type        | Point |
 
  45           | geojson+coordinates | [9.5036065, 47.0660892] |
 
  48           | has_address | attributes    |
 
  52     Scenario: Reverse geojson - Tiger address
 
  53         When sending v1/reverse with format geojson
 
  55           | 32.4752389363 | -86.4810198619 |
 
  56         Then a HTTP 200 is returned
 
  57         And the result is valid geojson with 1 result
 
  58         And all results contain
 
  59           | osm_type | osm_id    | category | type  | addresstype  | place_rank |
 
  60           | way      | 396009653 | place    | house | place        | 30         |
 
  62     Scenario: Reverse geojson - Interpolation address
 
  63         When sending v1/reverse with format geojson
 
  65           | 47.118533 | 9.57056562 |
 
  66         Then a HTTP 200 is returned
 
  67         And the result is valid geojson with 1 result
 
  68         And all results contain
 
  69           | osm_type | osm_id | place_rank | category | type    | addresstype |
 
  70           | way      | 1      | 30         | place    | house   | place       |
 
  71         And all results contain
 
  72           | boundingbox!in_box |
 
  73           | 47.118494, 47.118596, 9.570495, 9.570597 |
 
  74         And all results contain
 
  76           | 1019, Grosssteg, Sücka, Triesenberg, Oberland, 9497, Liechtenstein |
 
  78     Scenario: Reverse geojson - Line geometry output is supported
 
  79         When sending v1/reverse with format geojson
 
  80           | lat      | lon     | polygon_geojson |
 
  81           | 47.06597 | 9.50467 | 1               |
 
  82         Then a HTTP 200 is returned
 
  83         And the result is valid geojson with 1 result
 
  84         And all results contain
 
  88     Scenario Outline: Reverse geojson - Only geojson polygons are supported
 
  89         When sending v1/reverse with format geojson
 
  90           | lat      | lon     | <param> |
 
  91           | 47.06597 | 9.50467 | 1       |
 
  92         Then a HTTP 200 is returned
 
  93         And the result is valid geojson with 1 result
 
  94         And all results contain