]> git.openstreetmap.org Git - nominatim.git/blob - test/bdd/api/reverse/v1_geojson.feature
Merge pull request #3222 from lonvia/fix-river-output
[nominatim.git] / test / bdd / api / reverse / v1_geojson.feature
1 @APIDB
2 Feature: Geojson for Reverse API
3     Testing correctness of geojson output (API version v1).
4
5     Scenario Outline: Simple OSM result
6         When sending v1/reverse at 47.066,9.504 with format geojson
7           | addressdetails |
8           | <has_address>  |
9         Then result has attributes place_id, importance, __licence
10         And result has <attributes> address
11         And results contain
12           | osm_type | osm_id     | place_rank | category | type    | addresstype |
13           | node     | 6522627624 | 30         | shop     | bakery  | shop        |
14         And results contain
15           | name                  | display_name |
16           | Dorfbäckerei Herrmann | Dorfbäckerei Herrmann, 29, Gnetsch, Mäls, Balzers, Oberland, 9496, Liechtenstein |
17         And results contain
18           | boundingbox |
19           | [47.0660392, 47.0661392, 9.5035565, 9.5036565] |
20         And results contain in field geojson
21           | type  | coordinates |
22           | Point | [9.5036065, 47.0660892] |
23
24         Examples:
25           | has_address | attributes     |
26           | 1           | attributes     |
27           | 0           | not attributes |
28
29
30     @Tiger
31     Scenario: Tiger address
32         When sending v1/reverse at 32.4752389363,-86.4810198619 with format geojson
33         Then results contain
34          | osm_type | osm_id    | category | type  | addresstype  | place_rank |
35          | way      | 396009653 | place    | house | place        | 30         |
36
37
38     Scenario: Interpolation address
39         When sending v1/reverse at 47.118533,9.57056562 with format geojson
40         Then results contain
41           | osm_type | osm_id | place_rank | category | type    | addresstype |
42           | way      | 1      | 30         | place    | house   | place       |
43         And results contain
44           | boundingbox |
45           | ^\[47.118495\d*, 47.118595\d*, 9.570496\d*, 9.570596\d*\] |
46         And results contain
47           | display_name |
48           | 1019, Grosssteg, Sücka, Triesenberg, Oberland, 9497, Liechtenstein |
49
50
51     Scenario: Line geometry output is supported
52         When sending v1/reverse at 47.06597,9.50467 with format geojson
53           | param           | value |
54           | polygon_geojson | 1     |
55         Then results contain in field geojson
56           | type       |
57           | LineString |
58
59
60     Scenario Outline: Only geojson polygons are supported
61         When sending v1/reverse at 47.06597,9.50467 with format geojson
62           | param   | value |
63           | <param> | 1     |
64         Then results contain in field geojson
65           | type  |
66           | Point |
67
68         Examples:
69           | param |
70           | polygon_text |
71           | polygon_svg  |
72           | polygon_kml  |