mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-14 18:37:58 +00:00
finish osm2pgsql tag tests
This commit is contained in:
@@ -109,7 +109,7 @@ Feature: Tag evaluation
|
||||
| tunnel | yes
|
||||
| waterway | stream
|
||||
| landuse | cemetry
|
||||
|
||||
| mountain_pass | yes
|
||||
|
||||
|
||||
Scenario Outline: Excluded places
|
||||
@@ -211,11 +211,14 @@ Feature: Tag evaluation
|
||||
Scenario Outline: Import of postal codes
|
||||
Given the osm nodes:
|
||||
| id | tags
|
||||
| 10 | 'place' : 'village', '<key>' : '<value>'
|
||||
| 10 | 'highway' : 'secondary', '<key>' : '<value>'
|
||||
| 11 | '<key>' : '<value>'
|
||||
When loading osm data
|
||||
Then table place contains
|
||||
| object | class | type | postcode
|
||||
| N10 | place | village | <value>
|
||||
| object | class | type | postcode
|
||||
| N10 | highway | secondary | <value>
|
||||
| N11 | place | postcode | <value>
|
||||
And table place has no entry for N10:place
|
||||
|
||||
Examples:
|
||||
| key | value
|
||||
@@ -237,3 +240,213 @@ Feature: Tag evaluation
|
||||
| N10 | amenity | hospital | Foo St | None
|
||||
| N20 | amenity | hospital | None | Foo Town
|
||||
|
||||
|
||||
Scenario Outline: Import of country
|
||||
Given the osm nodes:
|
||||
| id | tags
|
||||
| 10 | 'place' : 'village', '<key>' : '<value>'
|
||||
When loading osm data
|
||||
Then table place contains
|
||||
| object | class | type | country_code
|
||||
| N10 | place | village | <value>
|
||||
|
||||
Examples:
|
||||
| key | value
|
||||
| country_code_iso3166_1_alpha_2 | gb
|
||||
| country_code_iso3166_1 | UK
|
||||
| country_code_iso3166 | de
|
||||
| country_code | us
|
||||
| iso3166-1:alpha2 | aU
|
||||
| iso3166-1 | 12
|
||||
| ISO3166-1 | XX
|
||||
| iso3166 | Nl
|
||||
| is_in:country_code | __
|
||||
| addr:country | ..
|
||||
| addr:country_code | cv
|
||||
|
||||
Scenario Outline: Ignore country codes with wrong length
|
||||
Given the osm nodes:
|
||||
| id | tags
|
||||
| 10 | 'place' : 'village', 'country_code' : '<value>'
|
||||
When loading osm data
|
||||
Then table place contains
|
||||
| object | class | type | country_code
|
||||
| N10 | place | village | None
|
||||
|
||||
Examples:
|
||||
| value
|
||||
| X
|
||||
| x
|
||||
| ger
|
||||
| dkeufr
|
||||
| d e
|
||||
|
||||
Scenario: Import of house numbers
|
||||
Given the osm nodes:
|
||||
| id | tags
|
||||
| 10 | 'building' : 'yes', 'addr:housenumber' : '4b'
|
||||
| 11 | 'building' : 'yes', 'addr:conscriptionnumber' : '003'
|
||||
| 12 | 'building' : 'yes', 'addr:streetnumber' : '2345'
|
||||
| 13 | 'building' : 'yes', 'addr:conscriptionnumber' : '3', 'addr:streetnumber' : '111'
|
||||
When loading osm data
|
||||
Then table place contains
|
||||
| object | class | type | housenumber
|
||||
| N10 | place | house | 4b
|
||||
| N11 | place | house | 003
|
||||
| N12 | place | house | 2345
|
||||
| N13 | place | house | 3/111
|
||||
|
||||
Scenario: Import of address interpolations
|
||||
Given the osm nodes:
|
||||
| id | tags
|
||||
| 10 | 'addr:interpolation' : 'odd'
|
||||
| 11 | 'addr:housenumber' : '10', 'addr:interpolation' : 'odd'
|
||||
| 12 | 'addr:interpolation' : 'odd', 'addr:housenumber' : '23'
|
||||
When loading osm data
|
||||
Then table place contains
|
||||
| object | class | type | housenumber
|
||||
| N10 | place | houses | odd
|
||||
| N11 | place | houses | odd
|
||||
| N12 | place | houses | odd
|
||||
|
||||
Scenario: Shorten tiger:county tags
|
||||
Given the osm nodes:
|
||||
| id | tags
|
||||
| 10 | 'place' : 'village', 'tiger:county' : 'Feebourgh, AL'
|
||||
| 11 | 'place' : 'village', 'addr:state' : 'Alabama', 'tiger:county' : 'Feebourgh, AL'
|
||||
When loading osm data
|
||||
Then table place contains
|
||||
| object | class | type | isin
|
||||
| N10 | place | village | Feebourgh county
|
||||
| N11 | place | village | Alabama,Feebourgh county
|
||||
|
||||
Scenario Outline: Import of address tags
|
||||
Given the osm nodes:
|
||||
| id | tags
|
||||
| 10 | 'place' : 'village', '<key>' : '<value>'
|
||||
When loading osm data
|
||||
Then table place contains
|
||||
| object | class | type | isin
|
||||
| N10 | place | village | <value>
|
||||
|
||||
Examples:
|
||||
| key | value
|
||||
| is_in | Stockholm, Sweden
|
||||
| is_in:country | Xanadu
|
||||
| addr:suburb | hinein
|
||||
| addr:county | le havre
|
||||
| addr:city | Sydney
|
||||
| addr:state | Jura
|
||||
|
||||
Scenario: Import of admin level
|
||||
Given the osm nodes:
|
||||
| id | tags
|
||||
| 10 | 'amenity' : 'hospital', 'admin_level' : '3'
|
||||
| 11 | 'amenity' : 'hospital', 'admin_level' : 'b'
|
||||
When loading osm data
|
||||
Then table place contains
|
||||
| object | class | type | admin_level
|
||||
| N10 | amenity | hospital | 3
|
||||
| N11 | amenity | hospital | 0
|
||||
|
||||
Scenario: Import of extra tags
|
||||
Given the osm nodes:
|
||||
| id | tags
|
||||
| 10 | 'tourism' : 'hotel', '<key>' : 'foo'
|
||||
When loading osm data
|
||||
Then table place contains
|
||||
| object | class | type | extratags
|
||||
| N10 | tourism | hotel | '<key>' : 'foo'
|
||||
|
||||
Examples:
|
||||
| key
|
||||
| tracktype
|
||||
| traffic_calming
|
||||
| service
|
||||
| cuisine
|
||||
| capital
|
||||
| dispensing
|
||||
| religion
|
||||
| denomination
|
||||
| sport
|
||||
| internet_access
|
||||
| lanes
|
||||
| surface
|
||||
| smoothness
|
||||
| width
|
||||
| est_width
|
||||
| incline
|
||||
| opening_hours
|
||||
| food_hours
|
||||
| collection_times
|
||||
| service_times
|
||||
| smoking_hours
|
||||
| disused
|
||||
| wheelchair
|
||||
| sac_scale
|
||||
| trail_visibility
|
||||
| mtb:scale
|
||||
| mtb:description
|
||||
| wood
|
||||
| drive_thru
|
||||
| drive_in
|
||||
| access
|
||||
| vehicle
|
||||
| bicyle
|
||||
| foot
|
||||
| goods
|
||||
| hgv
|
||||
| motor_vehicle
|
||||
| motor_car
|
||||
| access:foot
|
||||
| contact:phone
|
||||
| drink:mate
|
||||
| oneway
|
||||
| date_on
|
||||
| date_off
|
||||
| day_on
|
||||
| day_off
|
||||
| hour_on
|
||||
| hour_off
|
||||
| maxweight
|
||||
| maxheight
|
||||
| maxspeed
|
||||
| disused
|
||||
| toll
|
||||
| charge
|
||||
| population
|
||||
| description
|
||||
| image
|
||||
| attribution
|
||||
| fax
|
||||
| email
|
||||
| url
|
||||
| website
|
||||
| phone
|
||||
| tel
|
||||
| real_ale
|
||||
| smoking
|
||||
| food
|
||||
| camera
|
||||
| brewery
|
||||
| locality
|
||||
| wikipedia
|
||||
| wikipedia:de
|
||||
|
||||
Scenario: buildings
|
||||
Given the osm nodes:
|
||||
| id | tags
|
||||
| 10 | 'tourism' : 'hotel', 'building' : 'yes'
|
||||
| 11 | 'building' : 'house'
|
||||
| 12 | 'building' : 'shed', 'addr:housenumber' : '1'
|
||||
| 13 | 'building' : 'yes', 'name' : 'Das Haus'
|
||||
| 14 | 'building' : 'yes', 'addr:postcode' : '12345'
|
||||
When loading osm data
|
||||
Then table place contains
|
||||
| object | class | type
|
||||
| N10 | tourism | hotel
|
||||
| N12 | place | house
|
||||
| N13 | building| yes
|
||||
| N14 | building| yes
|
||||
And table place has no entry for N10:building
|
||||
And table place has no entry for N11
|
||||
|
||||
Reference in New Issue
Block a user