1 Feature: Import into placex
2 Tests that data in placex is completed correctly.
4 Scenario: No country code tag is available
6 | osm | class | type | geometry |
7 | N1 | highway | primary | country:us |
10 | object | address | country_code |
13 Scenario: Location overwrites country code tag
14 Given the named places
15 | osm | class | type | country | geometry |
16 | N1 | highway | primary | de | country:us |
19 | object | addr+country | country_code |
22 Scenario: Country code tag overwrites location for countries
23 Given the named places
24 | osm | class | type | admin | country | geometry |
25 | R1 | boundary | administrative | 2 | de | (-100 40, -101 40, -101 41, -100 41, -100 40) |
28 | object | rank_search| addr+country | country_code |
31 Scenario: Illegal country code tag for countries is ignored
32 Given the named places
33 | osm | class | type | admin | country | geometry |
34 | R1 | boundary | administrative | 2 | xx | (-100 40, -101 40, -101 41, -100 41, -100 40) |
37 | object | addr+country | country_code |
40 Scenario: admin level is copied over
41 Given the named places
42 | osm | class | type | admin |
43 | N1 | place | state | 3 |
46 | object | admin_level |
49 Scenario: search and address ranks for boundaries are correctly assigned
50 Given the named places
51 | osm | class | type |
52 | N1 | boundary | administrative |
54 | osm | class | type | geometry |
55 | W10 | boundary | administrative | 10 10, 11 11 |
57 | osm | class | type | admin | geometry |
58 | R20 | boundary | administrative | 2 | (1 1, 2 2, 1 2, 1 1) |
59 | R21 | boundary | administrative | 32 | (3 3, 4 4, 3 4, 3 3) |
60 | R22 | boundary | nature_park | 6 | (0 0, 1 0, 0 1, 0 0) |
61 | R23 | boundary | natural_reserve| 10 | (0 0, 1 1, 1 0, 0 0) |
63 | osm | class | type | geometry |
64 | R40 | place | country | (1 1, 2 2, 1 2, 1 1) |
65 | R41 | place | state | (3 3, 4 4, 3 4, 3 3) |
67 Then placex has no entry for N1
68 And placex has no entry for W10
70 | object | rank_search | rank_address |
78 Scenario: search and address ranks for highways correctly assigned
80 | 10 | 1 | 11 | | 12 | | 13 | | 14 | | 15 | | 16 |
82 | osm | class | type |
83 | N1 | highway | bus_stop |
85 | osm | class | type | geometry |
86 | W1 | highway | primary | 10,11 |
87 | W2 | highway | secondary | 11,12 |
88 | W3 | highway | tertiary | 12,13 |
89 | W4 | highway | residential | 13,14 |
90 | W5 | highway | unclassified | 14,15 |
91 | W6 | highway | something | 15,16 |
94 | object | rank_search | rank_address |
103 Scenario: rank and inclusion of landuses
105 | 1 | 2 | | | | | | 5 |
106 | 4 | 3 | | | | | | 6 |
107 Given the named places
108 | osm | class | type |
109 | N2 | landuse | residential |
111 | osm | class | type | geometry |
112 | W2 | landuse | residential | 1,2,5 |
113 | W4 | landuse | residential | (1,4,3,1) |
114 | R2 | landuse | residential | (1,2,3,4,1) |
115 | R3 | landuse | forrest | (1,5,6,4,1) |
118 | object | rank_search | rank_address |
125 Scenario: rank and inclusion of naturals
127 | 1 | 2 | | | | | | 5 |
128 | 4 | 3 | | | | | | 6 |
129 Given the named places
130 | osm | class | type |
131 | N2 | natural | peak |
132 | N4 | natural | volcano |
133 | N5 | natural | foobar |
135 | osm | class | type | geometry |
136 | W2 | natural | mountain_range | 1,2,5 |
137 | W3 | natural | foobar | 2,3 |
138 | R3 | natural | volcano | (1,2,4,1) |
139 | R4 | natural | foobar | (1,2,3,4,1) |
140 | R5 | natural | sea | (1,2,5,6,3,4,1) |
141 | R6 | natural | sea | (2,3,4,2) |
144 | object | rank_search | rank_address |
155 Scenario: boundary ways for countries and states are ignored
159 Given the named places
160 | osm | class | type | admin | geometry |
161 | W4 | boundary | administrative | 2 | (1,2,3,4,1) |
162 | R4 | boundary | administrative | 2 | (1,2,3,4,1) |
163 | W5 | boundary | administrative | 3 | (1,2,3,4,1) |
164 | R5 | boundary | administrative | 3 | (1,2,3,4,1) |
165 | W6 | boundary | administrative | 4 | (1,2,3,4,1) |
166 | R6 | boundary | administrative | 4 | (1,2,3,4,1) |
167 | W7 | boundary | administrative | 5 | (1,2,3,4,1) |
168 | R7 | boundary | administrative | 5 | (1,2,3,4,1) |
170 Then placex contains exactly