2 Feature: Country handling
3 Tests for import and use of country information
5 Scenario: Country names from OSM country relations are added
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) |
10 | osm | class | type | name | geometry |
11 | N1 | place | town | Wenig | country:de |
13 When sending search query "Wenig, Loudou"
15 | osm | display_name |
16 | N1 | Wenig, Deutschland |
17 When sending search query "Wenig"
21 | osm | display_name |
22 | N1 | Wenig, Loudou |
24 Scenario: OSM country relations outside expected boundaries are ignored for naming
29 | osm | class | type | admin | name+name:xy | country | geometry |
30 | R1 | boundary | administrative | 2 | Loudou | de | (1,2,3,4,1) |
32 | osm | class | type | name | geometry |
33 | N1 | place | town | Wenig | country:de |
35 When sending search query "Wenig"
39 | osm | display_name |
40 | N1 | Wenig, Germany |
42 Scenario: Pre-defined country names are used
43 Given the grid with origin CH
46 | osm | class | type | name | geometry |
47 | N1 | place | town | Ingb | 1 |
49 And sending search query "Ingb"
53 | osm | display_name |
54 | N1 | Ingb, Switzerland |
56 Scenario: For overlapping countries, pre-defined countries are tie-breakers
57 Given the grid with origin US
61 Given the named places
62 | osm | class | type | admin | country | geometry |
63 | R1 | boundary | administrative | 2 | de | (1,5,6,4,1) |
64 | R2 | boundary | administrative | 2 | us | (1,2,3,4,1) |
66 | osm | class | type | geometry |
67 | N1 | place | town | 9 |
68 | N2 | place | town | 8 |
71 | object | country_code |
75 Scenario: For overlapping countries outside pre-define countries prefer smaller partition
76 Given the grid with origin US
80 Given the named places
81 | osm | class | type | admin | country | geometry |
82 | R1 | boundary | administrative | 2 | ch | (1,5,6,4,1) |
83 | R2 | boundary | administrative | 2 | de | (1,2,3,4,1) |
85 | osm | class | type | geometry |
86 | N1 | place | town | 9 |
87 | N2 | place | town | 8 |
90 | object | country_code |