]> git.openstreetmap.org Git - nominatim.git/blob - test/bdd/api/reverse/v1_xml.feature
Merge pull request #3121 from lonvia/port-remaining-api-calls
[nominatim.git] / test / bdd / api / reverse / v1_xml.feature
1 @APIDB
2 Feature: XML output for Reverse API
3     Testing correctness of xml output (API version v1).
4
5     Scenario Outline: OSM result with and without addresses
6         When sending v1/reverse at 47.066,9.504 with format xml
7           | addressdetails |
8           | <has_address>  |
9         Then result has attributes place_id
10         Then result has <attributes> address
11         And results contain
12           | osm_type | osm_id     | place_rank | address_rank |
13           | node     | 6522627624 | 30         | 30           |
14         And results contain
15           | centroid             | boundingbox |
16           | 9.5036065 47.0660892 | 47.0660392,47.0661392,9.5035565,9.5036565 |
17         And results contain
18           | ref                   | display_name |
19           | Dorfbäckerei Herrmann | Dorfbäckerei Herrmann, 29, Gnetsch, Mäls, Balzers, Oberland, 9496, Liechtenstein |
20
21         Examples:
22           | has_address | attributes     |
23           | 1           | attributes     |
24           | 0           | not attributes |
25
26
27     @Tiger
28     Scenario: Tiger address
29         When sending v1/reverse at 32.4752389363,-86.4810198619 with format xml
30         Then results contain
31          | osm_type | osm_id    | place_rank  | address_rank |
32          | way      | 396009653 | 30          | 30           |
33         And results contain
34           | centroid                     | boundingbox |
35           | -86.4808553 32.4753580 | ^32.4753080\d*,32.4754080\d*,-86.4809053\d*,-86.4808053\d* |
36         And results contain
37           | display_name |
38           | 707, Upper Kingston Road, Upper Kingston, Prattville, Autauga County, 36067, United States |
39
40
41     Scenario: Interpolation address
42         When sending v1/reverse at 47.118533,9.57056562 with format xml
43         Then results contain
44           | osm_type | osm_id | place_rank | address_rank |
45           | way      | 1      | 30         | 30           |
46         And results contain
47           | centroid                | boundingbox |
48           | 9.57054676 47.118545392 | ^47.118495\d*,47.118595\d*,9.570496\d*,9.570596\d* |
49         And results contain
50           | display_name |
51           | 1019, Grosssteg, Sücka, Triesenberg, Oberland, 9497, Liechtenstein |
52
53
54     Scenario: Output of geojson
55        When sending v1/reverse at 47.06597,9.50467 with format xml
56           | param           | value |
57           | polygon_geojson | 1     |
58        Then results contain
59           | geojson |
60           | {"type":"LineString","coordinates":[[9.5039353,47.0657546],[9.5040437,47.0657781],[9.5040808,47.065787],[9.5054298,47.0661407]]}  |
61
62
63     Scenario: Output of WKT
64        When sending v1/reverse at 47.06597,9.50467 with format xml
65           | param        | value |
66           | polygon_text | 1     |
67        Then results contain
68           | geotext |
69           | LINESTRING(9.5039353 47.0657546,9.5040437 47.0657781,9.5040808 47.065787,9.5054298 47.0661407) |
70
71
72     Scenario: Output of SVG
73        When sending v1/reverse at 47.06597,9.50467 with format xml
74           | param       | value |
75           | polygon_svg | 1     |
76        Then results contain
77           | geosvg |
78           | M 9.5039353 -47.0657546 L 9.5040437 -47.0657781 9.5040808 -47.065787 9.5054298 -47.0661407 |
79
80
81     Scenario: Output of KML
82        When sending v1/reverse at 47.06597,9.50467 with format xml
83           | param       | value |
84           | polygon_kml | 1     |
85        Then results contain
86           | geokml |
87           | ^<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> |