]> git.openstreetmap.org Git - nominatim.git/blob - test/bdd/api/reverse/v1_xml.feature
ec001b0b50b6bf6de75a1cc03e88053b74c08b03
[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           | lat        | lon       | boundingbox |
16           | 47.0660892 | 9.5036065 | 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           | lat               | lon                | boundingbox |
35           | 32.47535802569396 | -86.48085532585448 | 32.475308025694,32.475408025694,-86.480905325854,-86.480805325854 |
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           | lat          | lon        | boundingbox |
48           | 47.118545392 | 9.57054676 | 47.118495392,47.118595392,9.57049676,9.57059676 |
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.5039353,47.0657546 9.5040437,47.0657781 9.5040808,47.065787 9.5054298,47.0661407</coordinates></LineString></geokml> |