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