From: Sarah Hoffmann Date: Mon, 17 Aug 2015 20:41:40 +0000 (+0200) Subject: gazetteer: exclude sidewalks X-Git-Tag: v.2.5.0~31 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/64797689321e9c098584be3671f29fbc856aa845 gazetteer: exclude sidewalks --- diff --git a/tests/features/osm2pgsql/import/tags.feature b/tests/features/osm2pgsql/import/tags.feature index 759c6b96..0aa16240 100644 --- a/tests/features/osm2pgsql/import/tags.feature +++ b/tests/features/osm2pgsql/import/tags.feature @@ -83,15 +83,15 @@ Feature: Tag evaluation Scenario: Special character in name tag Given the osm nodes: | id | tags - | 1 | 'highway' : 'yes', 'name: de' : 'Foo', 'name' : 'real' - | 2 | 'highway' : 'yes', 'name:\nde' : 'Foo', 'name' : 'real' - | 3 | 'highway' : 'yes', 'name:\tde' : 'Foo', 'name:\\' : 'real' + | 1 | 'highway' : 'yes', 'name: de' : 'Foo', 'name' : 'real1' + | 2 | 'highway' : 'yes', 'name: de' : 'Foo', 'name' : 'real2' + | 3 | 'highway' : 'yes', 'name: de' : 'Foo', 'name:\\' : 'real3' When loading osm data Then table place contains | object | name - | N1 | 'name:_de' : 'Foo', 'name' : 'real' - | N2 | 'name:_de' : 'Foo', 'name' : 'real' - | N3 | 'name:_de' : 'Foo', 'name:\\\\' : 'real' + | N1 | 'name: de' : 'Foo', 'name' : 'real1' + | N2 | 'name: de' : 'Foo', 'name' : 'real2' + | N3 | 'name: de' : 'Foo', 'name:\\\\' : 'real3' Scenario Outline: Included places Given the osm nodes: @@ -217,6 +217,14 @@ Feature: Tag evaluation | boundary | administrative | waterway | stream + Scenario: Footways are not included if they are sidewalks + Given the osm nodes: + | id | tags + | 2 | 'highway' : 'footway', 'name' : 'To Hell', 'footway' : 'sidewalk' + | 23 | 'highway' : 'footway', 'name' : 'x' + When loading osm data + Then table place has no entry for N2 + Scenario: named junctions are included if there is no other tag Given the osm nodes: | id | tags @@ -393,7 +401,7 @@ Feature: Tag evaluation Then table place contains | object | class | type | isin | N10 | place | village | Feebourgh county - | N11 | place | village | Alabama,Feebourgh county + | N11 | place | village | Feebourgh county,Alabama | N12 | place | village | Feebourgh county Scenario Outline: Import of address tags diff --git a/tests/steps/osm2pgsql_setup.py b/tests/steps/osm2pgsql_setup.py index e5198d9d..d38ceb6e 100644 --- a/tests/steps/osm2pgsql_setup.py +++ b/tests/steps/osm2pgsql_setup.py @@ -140,7 +140,7 @@ def osm2pgsql_load_place(step): world.osm2pgsql.sort(cmp=_sort_xml_entries) # create a OSM file in /tmp - with tempfile.NamedTemporaryFile(dir='/tmp', delete=False) as fd: + with tempfile.NamedTemporaryFile(dir='/tmp', suffix='.osm', delete=False) as fd: fname = fd.name fd.write("\n") fd.write('\n')