2 Feature: Tag evaluation
3 Tests if tags are correctly imported into the place table
5 Scenario Outline: Name tags
8 | 1 | 'highway' : 'yes', '<nametag>' : 'Foo'
10 Then table place contains
12 | N1 | '<nametag>' : 'Foo'
51 Scenario Outline: Ignored name tags
54 | 1 | 'highway' : 'yes', '<nametag>' : 'Foo', 'name' : 'real'
56 Then table place contains
58 | N1 | 'name' : 'real'
70 Scenario: Special character in name tag
73 | 1 | 'highway' : 'yes', 'name: de' : 'Foo', 'name' : 'real'
74 | 2 | 'highway' : 'yes', 'name:\nde' : 'Foo', 'name' : 'real'
75 | 3 | 'highway' : 'yes', 'name:\tde' : 'Foo', 'name:\\' : 'real'
77 Then table place contains
79 | N1 | 'name:_de' : 'Foo', 'name' : 'real'
80 | N2 | 'name:_de' : 'Foo', 'name' : 'real'
81 | N3 | 'name:_de' : 'Foo', 'name:\\\\' : 'real'
83 Scenario Outline: Included places
86 | 1 | '<key>' : '<value>', 'name' : 'real'
88 Then table place contains
90 | N1 | 'name' : 'real'
95 | tourism | information
99 | highway | residential
100 | aerialway | station
102 | boundary | administrative
105 | leisure | playground
115 Scenario Outline: Excluded places
118 | 1 | '<key>' : '<value>', 'name' : 'real'
119 | 2 | 'highway' : 'motorway', 'name' : 'To Hell'
120 When loading osm data
121 Then table place has no entry for N1
136 | highway | turning_circle
137 | highway | traffic_signals
138 | highway | mini_roundabout
152 | waterway | riverbank
155 Scenario: Boundary with place tag
164 | 2 | 'boundary' : 'administrative', 'place' : 'city' | 200 201 202 203 200
165 | 20 | 'place' : 'city' | 200 201 202 203 200
166 | 40 | 'place' : 'city', 'boundary' : 'statistical' | 200 201 202 203 200
167 When loading osm data
168 Then table place contains
169 | object | class | type | extratags
170 | W2 | boundary | administrative | 'place' : 'city'
171 | W20 | place | city |
172 | W40:boundary | boundary | statistical |
173 | W40:place | place | city |
174 And table place has no entry for W2:place
176 Scenario Outline: Tags that describe a house
179 | 100 | '<key>' : '<value>'
180 | 999 | 'amenity' : 'prison', '<key>' : '<value>'
181 When loading osm data
182 Then table place contains
183 | object | class | type
184 | N100 | place | house
185 | N999 | amenity | prison
186 And table place has no entry for N100:<key>
187 And table place has no entry for N999:<key>
188 And table place has no entry for N999:place
192 | addr:housename | My Mansion
193 | addr:housenumber | 456
194 | addr:conscriptionnumber | 4
195 | addr:streetnumber | 4568765
197 Scenario: Only named with no other interesting tag
200 | 1 | 'landuse' : 'meadow'
201 | 2 | 'landuse' : 'residential', 'name' : 'important'
202 | 3 | 'landuse' : 'residential', 'name' : 'important', 'place' : 'hamlet'
203 When loading osm data
204 Then table place contains
205 | object | class | type
206 | N2 | landuse | residential
207 | N3 | place | hamlet
208 And table place has no entry for N1
209 And table place has no entry for N3:landuse
211 Scenario Outline: Import of postal codes
214 | 10 | 'place' : 'village', '<key>' : '<value>'
215 When loading osm data
216 Then table place contains
217 | object | class | type | postcode
218 | N10 | place | village | <value>
222 | postal_code | 45736
223 | post_code | gf4 65g
225 | addr:postcode | 564
226 | tiger:zip_left | 00011
227 | tiger:zip_right | 09123
229 Scenario: Import of street and place
232 | 10 | 'amenity' : 'hospital', 'addr:street' : 'Foo St'
233 | 20 | 'amenity' : 'hospital', 'addr:place' : 'Foo Town'
234 When loading osm data
235 Then table place contains
236 | object | class | type | street | addr_place
237 | N10 | amenity | hospital | Foo St | None
238 | N20 | amenity | hospital | None | Foo Town