1 Feature: XML output for Reverse API
 
   2     Testing correctness of xml output (API version v1).
 
   4     Scenario Outline: Reverse XML - Simple reverse-geocoding with no results
 
   5         When sending v1/reverse
 
   8         Then a HTTP 200 is returned
 
   9         And the result is valid xml
 
  10         And the result has no attributes osm_type, address, extratags
 
  11         And the result contains
 
  23     Scenario Outline: Reverse XML - OSM result with and without addresses
 
  24         When sending v1/reverse with format xml
 
  25           | lat    | lon   | addressdetails |
 
  26           | 47.066 | 9.504 | <has_address>  |
 
  27         Then a HTTP 200 is returned
 
  28         And the result is valid xml
 
  29         And the result has attributes place_id
 
  30         And the result has <attributes> address
 
  31         And the result contains
 
  32           | osm_type | osm_id     | place_rank | address_rank |
 
  33           | node     | 6522627624 | 30         | 30           |
 
  34         And the result contains
 
  35           | lon       | lat        | boundingbox |
 
  36           | 9.5036065 | 47.0660892 | 47.0660392,47.0661392,9.5035565,9.5036565 |
 
  37         And the result contains
 
  38           | ref                   | display_name |
 
  39           | Dorfbäckerei Herrmann | Dorfbäckerei Herrmann, 29, Gnetsch, Mäls, Balzers, Oberland, 9496, Liechtenstein |
 
  42           | has_address | attributes     |
 
  46     Scenario: Reverse XML - Tiger address
 
  47         When sending v1/reverse with format xml
 
  49           | 32.4752389363 | -86.4810198619 |
 
  50         Then a HTTP 200 is returned
 
  51         And the result is valid xml
 
  52         And the result contains
 
  53           | osm_type | osm_id    | place_rank  | address_rank |
 
  54           | way      | 396009653 | 30          | 30           |
 
  55         And the result contains
 
  56           | lon         | lat        | boundingbox |
 
  57           | -86.4808553 | 32.4753580 | 32.4753080,32.4754080,-86.4809053,-86.4808053 |
 
  58         And the result contains
 
  60           | 707, Upper Kingston Road, Upper Kingston, Prattville, Autauga County, 36067, United States |
 
  62     Scenario: Reverse XML - Interpolation address
 
  63         When sending v1/reverse with format xml
 
  65           | 47.118533 | 9.57056562 |
 
  66         Then a HTTP 200 is returned
 
  67         And the result is valid xml
 
  68         And the result contains
 
  69           | osm_type | osm_id | place_rank | address_rank |
 
  71         And the result contains
 
  72           | lon       | lat        | boundingbox |
 
  73           | 9.5705468 | 47.1185454 | 47.1184954,47.1185954,9.5704968,9.5705968 |
 
  74         And the result contains
 
  76           | 1019, Grosssteg, Sücka, Triesenberg, Oberland, 9497, Liechtenstein |
 
  78     Scenario: Reverse XML - Output of geojson
 
  79         When sending v1/reverse with format xml
 
  80           | lat      | lon     | polygon_geojson |
 
  81           | 47.06597 | 9.50467 | 1               |
 
  82         Then a HTTP 200 is returned
 
  83         And the result is valid xml
 
  84         And the result contains
 
  86           | {"type":"LineString","coordinates":[[9.5039353,47.0657546],[9.5040437,47.0657781],[9.5040808,47.065787],[9.5054298,47.0661407]]}  |
 
  88     Scenario: Reverse XML - Output of WKT
 
  89         When sending v1/reverse with format xml
 
  90           | lat      | lon     | polygon_text |
 
  91           | 47.06597 | 9.50467 | 1            |
 
  92         Then a HTTP 200 is returned
 
  93         And the result is valid xml
 
  94         And the result contains
 
  96           | 9.5039353 47.0657546, 9.5040437 47.0657781, 9.5040808 47.065787, 9.5054298 47.0661407 |
 
  98     Scenario: Reverse XML - Output of SVG
 
  99         When sending v1/reverse with format xml
 
 100           | lat      | lon     | polygon_svg |
 
 101           | 47.06597 | 9.50467 | 1           |
 
 102         Then a HTTP 200 is returned
 
 103         And the result is valid xml
 
 104         And the result contains
 
 106           | M 9.5039353 -47.0657546 L 9.5040437 -47.0657781 9.5040808 -47.065787 9.5054298 -47.0661407 |
 
 108     Scenario: Reverse XML - Output of KML
 
 109        When sending v1/reverse with format xml
 
 110           | lat      | lon     | polygon_kml |
 
 111           | 47.06597 | 9.50467 | 1           |
 
 112         Then a HTTP 200 is returned
 
 113         And the result is valid xml
 
 114        And the result contains
 
 116           | <geokml><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></geokml> |