mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-15 19:07:58 +00:00
put postcodes in extra table on import
This commit is contained in:
@@ -92,12 +92,16 @@ Feature: Tag evaluation
|
||||
n6001 Tshop=bank,addr:postcode=12345
|
||||
n6002 Tshop=bank,tiger:zip_left=34343
|
||||
n6003 Tshop=bank,is_in:postcode=9009
|
||||
n6004 Taddr:postcode=54322
|
||||
"""
|
||||
Then place contains exactly
|
||||
| object | class | address!dict |
|
||||
| N6001 | shop | 'postcode': '12345' |
|
||||
| N6002 | shop | 'postcode': '34343' |
|
||||
| N6003 | shop | - |
|
||||
And place_postcode contains exactly
|
||||
| object | postcode | geometry |
|
||||
| N6004 | 54322 | - |
|
||||
|
||||
|
||||
Scenario: Postcode areas
|
||||
@@ -107,11 +111,15 @@ Feature: Tag evaluation
|
||||
n2 x12.36853 y51.42362
|
||||
n3 x12.63666 y51.42362
|
||||
n4 x12.63666 y51.50618
|
||||
w1 Tboundary=postal_code,ref=3456 Nn1,n2,n3,n4,n1
|
||||
w1 Nn1,n2,n3,n4,n1
|
||||
w2 Tboundary=postal_code,postal_code=443 Nn1,n2,n3,n4,n1
|
||||
r1 Ttype=boundary,boundary=postal_code,postal_code=3456 Mw1@
|
||||
"""
|
||||
Then place contains exactly
|
||||
| object | class | type | name!dict |
|
||||
| W1 | boundary | postal_code | 'ref': '3456' |
|
||||
| object |
|
||||
And place_postcode contains exactly
|
||||
| object | postcode | geometry!wkt |
|
||||
| R1 | 3456 | (12.36853 51.50618, 12.36853 51.42362, 12.63666 51.42362, 12.63666 51.50618, 12.36853 51.50618) |
|
||||
|
||||
Scenario: Main with extra
|
||||
When loading osm data
|
||||
@@ -192,7 +200,9 @@ Feature: Tag evaluation
|
||||
| N12001 | tourism | hotel |
|
||||
| N12003 | building | shed |
|
||||
| N12004 | building | yes |
|
||||
| N12005 | place | postcode |
|
||||
And place_postcode contains exactly
|
||||
| object | postcode | geometry |
|
||||
| N12005 | 12345 | - |
|
||||
|
||||
|
||||
Scenario: Address interpolations
|
||||
|
||||
@@ -2,7 +2,6 @@ Feature: Update of postcode only objects
|
||||
Tests that changes to objects containing only a postcode are
|
||||
propagated correctly.
|
||||
|
||||
|
||||
Scenario: Adding a postcode-only node
|
||||
When loading osm data
|
||||
"""
|
||||
@@ -15,11 +14,10 @@ Feature: Update of postcode only objects
|
||||
"""
|
||||
n34 Tpostcode=4456
|
||||
"""
|
||||
Then place contains exactly
|
||||
| object | class | type |
|
||||
| N34 | place | postcode |
|
||||
When indexing
|
||||
Then placex contains exactly
|
||||
Then place_postcode contains exactly
|
||||
| object | postcode |
|
||||
| N34 | 4456 |
|
||||
And place contains exactly
|
||||
| object |
|
||||
|
||||
|
||||
@@ -28,9 +26,11 @@ Feature: Update of postcode only objects
|
||||
"""
|
||||
n34 Tpostcode=4456
|
||||
"""
|
||||
Then place contains exactly
|
||||
| object | class | type |
|
||||
| N34 | place | postcode |
|
||||
Then place_postcode contains exactly
|
||||
| object | postcode |
|
||||
| N34 | 4456 |
|
||||
And place contains exactly
|
||||
| object |
|
||||
|
||||
When updating osm data
|
||||
"""
|
||||
@@ -38,8 +38,7 @@ Feature: Update of postcode only objects
|
||||
"""
|
||||
Then place contains exactly
|
||||
| object |
|
||||
When indexing
|
||||
Then placex contains exactly
|
||||
And place_postcode contains exactly
|
||||
| object |
|
||||
|
||||
|
||||
@@ -57,8 +56,10 @@ Feature: Update of postcode only objects
|
||||
n34 Tpostcode=4456
|
||||
"""
|
||||
Then place contains exactly
|
||||
| object | class | type |
|
||||
| N34 | place | postcode |
|
||||
| object |
|
||||
And place_postcode contains exactly
|
||||
| object | postcode |
|
||||
| N34 | 4456 |
|
||||
When indexing
|
||||
Then placex contains exactly
|
||||
| object |
|
||||
@@ -74,9 +75,9 @@ Feature: Update of postcode only objects
|
||||
"""
|
||||
n34 Tpostcode=4456
|
||||
"""
|
||||
Then place contains exactly
|
||||
| object | class | type |
|
||||
| N34 | place | postcode |
|
||||
Then place_postcode contains exactly
|
||||
| object | postcode |
|
||||
| N34 | 4456 |
|
||||
|
||||
When updating osm data
|
||||
"""
|
||||
@@ -85,6 +86,8 @@ Feature: Update of postcode only objects
|
||||
Then place contains exactly
|
||||
| object | class | type |
|
||||
| N34 | <class> | <type> |
|
||||
And place_postcode contains exactly
|
||||
| object |
|
||||
When indexing
|
||||
Then placex contains exactly
|
||||
| object | class | type |
|
||||
@@ -96,7 +99,7 @@ Feature: Update of postcode only objects
|
||||
| place | hamlet |
|
||||
|
||||
|
||||
Scenario: Converting na interpolation into a postcode-only node
|
||||
Scenario: Converting an interpolation into a postcode-only node
|
||||
Given the grid
|
||||
| 1 | 2 |
|
||||
When loading osm data
|
||||
@@ -119,14 +122,12 @@ Feature: Update of postcode only objects
|
||||
| object | class | type |
|
||||
| N1 | place | house |
|
||||
| N2 | place | house |
|
||||
| W34 | place | postcode |
|
||||
Then place_postcode contains exactly
|
||||
| object | postcode |
|
||||
| W34 | 4456 |
|
||||
When indexing
|
||||
Then location_property_osmline contains exactly
|
||||
| osm_id |
|
||||
And placex contains exactly
|
||||
| object | class | type |
|
||||
| N1 | place | house |
|
||||
| N2 | place | house |
|
||||
|
||||
|
||||
Scenario: Converting a postcode-only node into an interpolation
|
||||
@@ -144,7 +145,9 @@ Feature: Update of postcode only objects
|
||||
| N1 | place | house |
|
||||
| N2 | place | house |
|
||||
| W33 | highway | residential |
|
||||
| W34 | place | postcode |
|
||||
And place_postcode contains exactly
|
||||
| object | postcode |
|
||||
| W34 | 4456 |
|
||||
|
||||
When updating osm data
|
||||
"""
|
||||
@@ -156,6 +159,8 @@ Feature: Update of postcode only objects
|
||||
| N2 | place | house |
|
||||
| W33 | highway | residential |
|
||||
| W34 | place | houses |
|
||||
And place_postcode contains exactly
|
||||
| object |
|
||||
When indexing
|
||||
Then location_property_osmline contains exactly
|
||||
| osm_id | startnumber | endnumber |
|
||||
|
||||
Reference in New Issue
Block a user