mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-03-10 12:04:06 +00:00
gazetteer: exclude sidewalks
This commit is contained in:
@@ -83,15 +83,15 @@ Feature: Tag evaluation
|
|||||||
Scenario: Special character in name tag
|
Scenario: Special character in name tag
|
||||||
Given the osm nodes:
|
Given the osm nodes:
|
||||||
| id | tags
|
| id | tags
|
||||||
| 1 | 'highway' : 'yes', 'name: de' : 'Foo', 'name' : 'real'
|
| 1 | 'highway' : 'yes', 'name: de' : 'Foo', 'name' : 'real1'
|
||||||
| 2 | 'highway' : 'yes', 'name:\nde' : 'Foo', 'name' : 'real'
|
| 2 | 'highway' : 'yes', 'name:
de' : 'Foo', 'name' : 'real2'
|
||||||
| 3 | 'highway' : 'yes', 'name:\tde' : 'Foo', 'name:\\' : 'real'
|
| 3 | 'highway' : 'yes', 'name:	de' : 'Foo', 'name:\\' : 'real3'
|
||||||
When loading osm data
|
When loading osm data
|
||||||
Then table place contains
|
Then table place contains
|
||||||
| object | name
|
| object | name
|
||||||
| N1 | 'name:_de' : 'Foo', 'name' : 'real'
|
| N1 | 'name: de' : 'Foo', 'name' : 'real1'
|
||||||
| N2 | 'name:_de' : 'Foo', 'name' : 'real'
|
| N2 | 'name: de' : 'Foo', 'name' : 'real2'
|
||||||
| N3 | 'name:_de' : 'Foo', 'name:\\\\' : 'real'
|
| N3 | 'name: de' : 'Foo', 'name:\\\\' : 'real3'
|
||||||
|
|
||||||
Scenario Outline: Included places
|
Scenario Outline: Included places
|
||||||
Given the osm nodes:
|
Given the osm nodes:
|
||||||
@@ -217,6 +217,14 @@ Feature: Tag evaluation
|
|||||||
| boundary | administrative
|
| boundary | administrative
|
||||||
| waterway | stream
|
| 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
|
Scenario: named junctions are included if there is no other tag
|
||||||
Given the osm nodes:
|
Given the osm nodes:
|
||||||
| id | tags
|
| id | tags
|
||||||
@@ -393,7 +401,7 @@ Feature: Tag evaluation
|
|||||||
Then table place contains
|
Then table place contains
|
||||||
| object | class | type | isin
|
| object | class | type | isin
|
||||||
| N10 | place | village | Feebourgh county
|
| N10 | place | village | Feebourgh county
|
||||||
| N11 | place | village | Alabama,Feebourgh county
|
| N11 | place | village | Feebourgh county,Alabama
|
||||||
| N12 | place | village | Feebourgh county
|
| N12 | place | village | Feebourgh county
|
||||||
|
|
||||||
Scenario Outline: Import of address tags
|
Scenario Outline: Import of address tags
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ def osm2pgsql_load_place(step):
|
|||||||
world.osm2pgsql.sort(cmp=_sort_xml_entries)
|
world.osm2pgsql.sort(cmp=_sort_xml_entries)
|
||||||
|
|
||||||
# create a OSM file in /tmp
|
# 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
|
fname = fd.name
|
||||||
fd.write("<?xml version='1.0' encoding='UTF-8'?>\n")
|
fd.write("<?xml version='1.0' encoding='UTF-8'?>\n")
|
||||||
fd.write('<osm version="0.6" generator="test-nominatim" timestamp="2014-08-26T20:22:02Z">\n')
|
fd.write('<osm version="0.6" generator="test-nominatim" timestamp="2014-08-26T20:22:02Z">\n')
|
||||||
|
|||||||
Reference in New Issue
Block a user