2 Feature: Import into placex
3 Tests that data in placex is completed correctly.
5 Scenario: No country code tag is available
7 | osm | class | type | geometry |
8 | N1 | highway | primary | country:us |
11 | object | addr+country | country_code |
14 Scenario: Location overwrites country code tag
15 Given the named places
16 | osm | class | type | country | geometry |
17 | N1 | highway | primary | de | country:us |
20 | object | addr+country | country_code |
23 Scenario: Country code tag overwrites location for countries
24 Given the named places
25 | osm | class | type | admin | country | geometry |
26 | R1 | boundary | administrative | 2 | de | (-100 40, -101 40, -101 41, -100 41, -100 40) |
29 | object | rank_search| addr+country | country_code |
32 Scenario: Illegal country code tag for countries is ignored
33 Given the named places
34 | osm | class | type | admin | country | geometry |
35 | R1 | boundary | administrative | 2 | xx | (-100 40, -101 40, -101 41, -100 41, -100 40) |
38 | object | addr+country | country_code |
41 Scenario: admin level is copied over
42 Given the named places
43 | osm | class | type | admin |
44 | N1 | place | state | 3 |
47 | object | admin_level |
50 Scenario: postcode node without postcode is dropped
52 | osm | class | type | name+ref |
53 | N1 | place | postcode | 12334 |
55 Then placex has no entry for N1
57 Scenario: postcode boundary without postcode is dropped
59 | osm | class | type | name+ref | geometry |
60 | R1 | boundary | postal_code | 554476 | poly-area:0.1 |
62 Then placex has no entry for R1
64 Scenario: search and address ranks for boundaries are correctly assigned
65 Given the named places
66 | osm | class | type |
67 | N1 | boundary | administrative |
69 | osm | class | type | geometry |
70 | W10 | boundary | administrative | 10 10, 11 11 |
72 | osm | class | type | admin | geometry |
73 | R20 | boundary | administrative | 2 | (1 1, 2 2, 1 2, 1 1) |
74 | R21 | boundary | administrative | 32 | (3 3, 4 4, 3 4, 3 3) |
75 | R22 | boundary | nature_park | 6 | (0 0, 1 0, 0 1, 0 0) |
76 | R23 | boundary | natural_reserve| 10 | (0 0, 1 1, 1 0, 0 0) |
78 | osm | class | type | geometry |
79 | R40 | place | country | (1 1, 2 2, 1 2, 1 1) |
80 | R41 | place | state | (3 3, 4 4, 3 4, 3 3) |
82 Then placex has no entry for N1
83 And placex has no entry for W10
85 | object | rank_search | rank_address |
93 Scenario: search and address ranks for highways correctly assigned
94 Given the scene roads-with-pois
96 | osm | class | type |
97 | N1 | highway | bus_stop |
99 | osm | class | type | geometry |
100 | W1 | highway | primary | :w-south |
101 | W2 | highway | secondary | :w-south |
102 | W3 | highway | tertiary | :w-south |
103 | W4 | highway | residential | :w-north |
104 | W5 | highway | unclassified | :w-north |
105 | W6 | highway | something | :w-north |
108 | object | rank_search | rank_address |
117 Scenario: rank and inclusion of landuses
118 Given the named places
119 | osm | class | type |
120 | N2 | landuse | residential |
122 | osm | class | type | geometry |
123 | W2 | landuse | residential | 1 1, 1 1.1 |
124 | W4 | landuse | residential | poly-area:0.1 |
125 | R2 | landuse | residential | poly-area:0.05 |
126 | R3 | landuse | forrest | poly-area:0.5 |
129 | object | rank_search | rank_address |
136 Scenario: rank and inclusion of naturals
137 Given the named places
138 | osm | class | type |
139 | N2 | natural | peak |
140 | N4 | natural | volcano |
141 | N5 | natural | foobar |
143 | osm | class | type | geometry |
144 | W2 | natural | mountain_range | 12 12,11 11 |
145 | W3 | natural | foobar | 13 13,13.1 13 |
146 | R3 | natural | volcano | poly-area:0.1 |
147 | R4 | natural | foobar | poly-area:0.5 |
148 | R5 | natural | sea | poly-area:5.0 |
149 | R6 | natural | sea | poly-area:0.01 |
152 | object | rank_search | rank_address |
163 Scenario: boundary ways for countries and states are ignored
164 Given the named places
165 | osm | class | type | admin | geometry |
166 | W4 | boundary | administrative | 2 | poly-area:0.1 |
167 | R4 | boundary | administrative | 2 | poly-area:0.1 |
168 | W5 | boundary | administrative | 3 | poly-area:0.1 |
169 | R5 | boundary | administrative | 3 | poly-area:0.1 |
170 | W6 | boundary | administrative | 4 | poly-area:0.1 |
171 | R6 | boundary | administrative | 4 | poly-area:0.1 |
172 | W7 | boundary | administrative | 5 | poly-area:0.1 |
173 | R7 | boundary | administrative | 5 | poly-area:0.1 |
175 Then placex contains exactly