]> git.openstreetmap.org Git - nominatim.git/blob - test/bdd/api/reverse/layers.feature
enable BDD tests for sqlite databases
[nominatim.git] / test / bdd / api / reverse / layers.feature
1 @SQLITE
2 @APIDB
3 Feature: Layer parameter in reverse geocoding
4     Testing correct function of layer selection while reverse geocoding
5
6     @v1-api-python-only
7     Scenario: POIs are selected by default
8         When sending v1/reverse at 47.14077,9.52414
9         Then results contain
10           | category | type      |
11           | tourism  | viewpoint |
12
13
14     @v1-api-python-only
15     Scenario Outline: Same address level POI with different layers
16         When sending v1/reverse at 47.14077,9.52414
17           | layer   |
18           | <layer> |
19         Then results contain
20           | category   |
21           | <category> |
22
23
24         Examples:
25           | layer           | category |
26           | address         | highway  |
27           | poi,address     | tourism  |
28           | address,poi     | tourism  |
29           | natural         | waterway |
30           | address,natural | highway  |
31           | natural,poi     | tourism  |
32
33
34     @v1-api-python-only
35      Scenario Outline: POIs are not selected without housenumber for address layer
36         When sending v1/reverse at 47.13816,9.52168
37           | layer   |
38           | <layer> |
39         Then results contain
40           | category   | type   |
41           | <category> | <type> |
42
43         Examples:
44           | layer       | category | type     |
45           | address,poi | highway  | bus_stop |
46           | address     | amenity  | parking  |
47
48
49     @v1-api-python-only
50      Scenario: Between natural and low-zoom address prefer natural
51          When sending v1/reverse at 47.13636,9.52094
52            | layer           | zoom |
53            | natural,address | 15   |
54          Then results contain
55            | category |
56            | waterway |
57
58
59     @v1-api-python-only
60     Scenario Outline: Search for mountain peaks begins at level 12
61         When sending v1/reverse at 47.08293,9.57109
62           | layer   | zoom   |
63           | natural | <zoom> |
64         Then results contain
65           | category   | type   |
66           | <category> | <type> |
67
68         Examples:
69           | zoom | category | type  |
70           | 12   | natural  | peak  |
71           | 13   | waterway | river |
72
73
74     @v1-api-python-only
75      Scenario Outline: Reverse search with manmade layers
76         When sending v1/reverse at 32.46904,-86.44439
77           | layer   |
78           | <layer> |
79         Then results contain
80           | category   | type   |
81           | <category> | <type> |
82
83         Examples:
84           | layer           | category | type        |
85           | manmade         | leisure  | park        |
86           | address         | highway  | residential |
87           | poi             | leisure  | pitch       |
88           | natural         | waterway | river       |
89           | natural,manmade | leisure  | park        |