]> git.openstreetmap.org Git - nominatim.git/blob - test/bdd/db/import/country.feature
update country_names from OSM data
[nominatim.git] / test / bdd / db / import / country.feature
1 @DB
2 Feature: Country handling
3     Tests for import and use of country information
4
5     Scenario: Country names from OSM country relations are added
6         Given the places
7             | osm  | class    | type           | admin | name+name:xy | country | geometry |
8             | R1   | boundary | administrative | 2     | Loudou       | de      | (9 52, 9 53, 10 52, 9 52) |
9         Given the places
10             | osm  | class    | type          | name  | geometry   |
11             | N1   | place    | town          | Wenig | country:de |
12         When importing
13         When searching for "Wenig, Loudou"
14         Then results contain
15             | osm_type | osm_id | name |
16             | N        | 1      | Wenig, Deutschland |
17         When searching for "Wenig"
18             | accept-language |
19             | xy,en |
20         Then results contain
21             | osm_type | osm_id | name |
22             | N        | 1      | Wenig, Loudou |
23     Scenario: OSM country relations outside expected boundaries are ignored
24         Given the places
25             | osm  | class    | type           | admin | name+name:xy | country | geometry |
26             | R1   | boundary | administrative | 2     | Loudou       | de      | poly-area:0.1 |
27         Given the places
28             | osm  | class    | type          | name  | geometry   |
29             | N1   | place    | town          | Wenig | country:de |
30         When importing
31         When searching for "Wenig"
32             | accept-language |
33             | xy,en |
34         Then results contain
35             | osm_type | osm_id | name |
36             | N        | 1      | Wenig, Germany |
37     Scenario: Pre-defined country names are used
38         Given the places
39             | osm  | class    | type          | name  | geometry   |
40             | N1   | place    | town          | Ingb  | country:ch |
41         When importing
42         And searching for "Ingb"
43             | accept-language |
44             | en,de |
45         Then results contain
46             | osm_type | osm_id | name |
47             | N        | 1      | Ingb, Switzerland |