mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 05:18:00 +00:00
bdd: move update tests from scenes to grid descriptions
This commit is contained in:
@@ -2,41 +2,47 @@
|
||||
Feature: Country handling
|
||||
Tests for update of country information
|
||||
|
||||
Background:
|
||||
Given the 1.0 grid with origin DE
|
||||
| 1 | | 2 |
|
||||
| | 10 | |
|
||||
| 4 | | 3 |
|
||||
|
||||
@fail-legacy
|
||||
Scenario: When country names are changed old ones are no longer searchable
|
||||
Given the places
|
||||
| osm | class | type | admin | name+name:xy | country | geometry |
|
||||
| R1 | boundary | administrative | 2 | Loudou | de | (9 52, 9 53, 10 52, 9 52) |
|
||||
| osm | class | type | admin | name+name:xy | country | geometry |
|
||||
| R1 | boundary | administrative | 2 | Loudou | de | (1,2,3,4,1) |
|
||||
Given the places
|
||||
| osm | class | type | name | geometry |
|
||||
| N1 | place | town | Wenig | country:de |
|
||||
| osm | class | type | name |
|
||||
| N10 | place | town | Wenig |
|
||||
When importing
|
||||
When sending search query "Wenig, Loudou"
|
||||
Then results contain
|
||||
| osm |
|
||||
| N1 |
|
||||
| N10 |
|
||||
When updating places
|
||||
| osm | class | type | admin | name+name:xy | country | geometry |
|
||||
| R1 | boundary | administrative | 2 | Germany | de | (9 52, 9 53, 10 52, 9 52) |
|
||||
| osm | class | type | admin | name+name:xy | country | geometry |
|
||||
| R1 | boundary | administrative | 2 | Germany | de | (1,2,3,4,1) |
|
||||
When sending search query "Wenig, Loudou"
|
||||
Then exactly 0 results are returned
|
||||
|
||||
@fail-legacy
|
||||
Scenario: When country names are deleted they are no longer searchable
|
||||
Given the places
|
||||
| osm | class | type | admin | name+name:xy | country | geometry |
|
||||
| R1 | boundary | administrative | 2 | Loudou | de | (9 52, 9 53, 10 52, 9 52) |
|
||||
| osm | class | type | admin | name+name:xy | country | geometry |
|
||||
| R1 | boundary | administrative | 2 | Loudou | de | (1,2,3,4,1) |
|
||||
Given the places
|
||||
| osm | class | type | name | geometry |
|
||||
| N1 | place | town | Wenig | country:de |
|
||||
| osm | class | type | name |
|
||||
| N10 | place | town | Wenig |
|
||||
When importing
|
||||
When sending search query "Wenig, Loudou"
|
||||
Then results contain
|
||||
| osm |
|
||||
| N1 |
|
||||
| N10 |
|
||||
When updating places
|
||||
| osm | class | type | admin | name+name:en | country | geometry |
|
||||
| R1 | boundary | administrative | 2 | Germany | de | (9 52, 9 53, 10 52, 9 52) |
|
||||
| osm | class | type | admin | name+name:en | country | geometry |
|
||||
| R1 | boundary | administrative | 2 | Germany | de | (1,2,3,4,1) |
|
||||
When sending search query "Wenig, Loudou"
|
||||
Then exactly 0 results are returned
|
||||
When sending search query "Wenig"
|
||||
@@ -44,57 +50,57 @@ Feature: Country handling
|
||||
| xy,en |
|
||||
Then results contain
|
||||
| osm | display_name |
|
||||
| N1 | Wenig, Germany |
|
||||
| N10 | Wenig, Germany |
|
||||
|
||||
|
||||
Scenario: Default country names are always searchable
|
||||
Given the places
|
||||
| osm | class | type | name | geometry |
|
||||
| N1 | place | town | Wenig | country:de |
|
||||
| osm | class | type | name |
|
||||
| N10 | place | town | Wenig |
|
||||
When importing
|
||||
When sending search query "Wenig, Germany"
|
||||
Then results contain
|
||||
| osm |
|
||||
| N1 |
|
||||
| N10 |
|
||||
When sending search query "Wenig, de"
|
||||
Then results contain
|
||||
| osm |
|
||||
| N1 |
|
||||
| N10 |
|
||||
When updating places
|
||||
| osm | class | type | admin | name+name:en | country | geometry |
|
||||
| R1 | boundary | administrative | 2 | Lilly | de | (9 52, 9 53, 10 52, 9 52) |
|
||||
| R1 | boundary | administrative | 2 | Lilly | de | (1,2,3,4,1) |
|
||||
When sending search query "Wenig, Germany"
|
||||
| accept-language |
|
||||
| en,de |
|
||||
Then results contain
|
||||
| osm | display_name |
|
||||
| N1 | Wenig, Lilly |
|
||||
| N10 | Wenig, Lilly |
|
||||
When sending search query "Wenig, de"
|
||||
| accept-language |
|
||||
| en,de |
|
||||
Then results contain
|
||||
| osm | display_name |
|
||||
| N1 | Wenig, Lilly |
|
||||
| N10 | Wenig, Lilly |
|
||||
|
||||
|
||||
@fail-legacy
|
||||
Scenario: When a localised name is deleted, the standard name takes over
|
||||
Given the places
|
||||
| osm | class | type | admin | name+name:de | country | geometry |
|
||||
| R1 | boundary | administrative | 2 | Loudou | de | (9 52, 9 53, 10 52, 9 52) |
|
||||
| osm | class | type | admin | name+name:de | country | geometry |
|
||||
| R1 | boundary | administrative | 2 | Loudou | de | (1,2,3,4,1) |
|
||||
Given the places
|
||||
| osm | class | type | name | geometry |
|
||||
| N1 | place | town | Wenig | country:de |
|
||||
| osm | class | type | name |
|
||||
| N10 | place | town | Wenig |
|
||||
When importing
|
||||
When sending search query "Wenig, Loudou"
|
||||
| accept-language |
|
||||
| de,en |
|
||||
Then results contain
|
||||
| osm | display_name |
|
||||
| N1 | Wenig, Loudou |
|
||||
| N10 | Wenig, Loudou |
|
||||
When updating places
|
||||
| osm | class | type | admin | name+name:en | country | geometry |
|
||||
| R1 | boundary | administrative | 2 | Germany | de | (9 52, 9 53, 10 52, 9 52) |
|
||||
| osm | class | type | admin | name+name:en | country | geometry |
|
||||
| R1 | boundary | administrative | 2 | Germany | de | (1,2,3,4,1) |
|
||||
When sending search query "Wenig, Loudou"
|
||||
Then exactly 0 results are returned
|
||||
When sending search query "Wenig"
|
||||
@@ -102,5 +108,5 @@ Feature: Country handling
|
||||
| de,en |
|
||||
Then results contain
|
||||
| osm | display_name |
|
||||
| N1 | Wenig, Deutschland |
|
||||
| N10 | Wenig, Deutschland |
|
||||
|
||||
|
||||
@@ -3,47 +3,55 @@ Feature: Update of address interpolations
|
||||
Test the interpolated address are updated correctly
|
||||
|
||||
Scenario: new interpolation added to existing street
|
||||
Given the scene parallel-road
|
||||
Given the grid
|
||||
| 10 | | | | 11 |
|
||||
| | 1 | 99 | 2 | |
|
||||
| | | | | |
|
||||
| 20 | | | | 21 |
|
||||
And the places
|
||||
| osm | class | type | name | geometry |
|
||||
| W2 | highway | unclassified | Sun Way | :w-north |
|
||||
| W3 | highway | unclassified | Cloud Street | :w-south |
|
||||
| W2 | highway | unclassified | Sun Way | 10,11 |
|
||||
| W3 | highway | unclassified | Cloud Street | 20,21 |
|
||||
And the ways
|
||||
| id | nodes |
|
||||
| 10 | 1,100,101,102,2 |
|
||||
| 10 | 1,2 |
|
||||
When importing
|
||||
Then W10 expands to no interpolation
|
||||
When updating places
|
||||
| osm | class | type | housenr | geometry |
|
||||
| N1 | place | house | 2 | :n-middle-w |
|
||||
| N2 | place | house | 6 | :n-middle-e |
|
||||
| osm | class | type | housenr |
|
||||
| N1 | place | house | 2 |
|
||||
| N2 | place | house | 6 |
|
||||
And updating places
|
||||
| osm | class | type | addr+interpolation | geometry |
|
||||
| W10 | place | houses | even | :w-middle |
|
||||
| W10 | place | houses | even | 1,2 |
|
||||
Then placex contains
|
||||
| object | parent_place_id |
|
||||
| N1 | W2 |
|
||||
| N2 | W2 |
|
||||
And W10 expands to interpolation
|
||||
| parent_place_id | start | end |
|
||||
| W2 | 4 | 4 |
|
||||
| parent_place_id | start | end | geometry |
|
||||
| W2 | 4 | 4 | 99 |
|
||||
|
||||
Scenario: addr:street added to interpolation
|
||||
Given the scene parallel-road
|
||||
Given the grid
|
||||
| 10 | | | | 11 |
|
||||
| | 1 | | 2 | |
|
||||
| | | | | |
|
||||
| 20 | | | | 21 |
|
||||
And the places
|
||||
| osm | class | type | housenr | geometry |
|
||||
| N1 | place | house | 2 | :n-middle-w |
|
||||
| N2 | place | house | 6 | :n-middle-e |
|
||||
| osm | class | type | housenr |
|
||||
| N1 | place | house | 2 |
|
||||
| N2 | place | house | 6 |
|
||||
And the places
|
||||
| osm | class | type | addr+interpolation | geometry |
|
||||
| W10 | place | houses | even | :w-middle |
|
||||
| W10 | place | houses | even | 1,2 |
|
||||
And the places
|
||||
| osm | class | type | name | geometry |
|
||||
| W2 | highway | unclassified | Sun Way | :w-north |
|
||||
| W3 | highway | unclassified | Cloud Street | :w-south |
|
||||
| W2 | highway | unclassified | Sun Way | 10,11 |
|
||||
| W3 | highway | unclassified | Cloud Street | 20,21 |
|
||||
And the ways
|
||||
| id | nodes |
|
||||
| 10 | 1,100,101,102,2 |
|
||||
| 10 | 1,2 |
|
||||
When importing
|
||||
Then placex contains
|
||||
| object | parent_place_id |
|
||||
@@ -54,7 +62,7 @@ Feature: Update of address interpolations
|
||||
| W2 | 4 | 4 |
|
||||
When updating places
|
||||
| osm | class | type | addr+interpolation | street | geometry |
|
||||
| W10 | place | houses | even | Cloud Street | :w-middle |
|
||||
| W10 | place | houses | even | Cloud Street | 1,2 |
|
||||
Then placex contains
|
||||
| object | parent_place_id |
|
||||
| N1 | W3 |
|
||||
@@ -64,21 +72,25 @@ Feature: Update of address interpolations
|
||||
| W3 | 4 | 4 |
|
||||
|
||||
Scenario: addr:street added to housenumbers
|
||||
Given the scene parallel-road
|
||||
Given the grid
|
||||
| 10 | | | | 11 |
|
||||
| | 1 | | 2 | |
|
||||
| | | | | |
|
||||
| 20 | | | | 21 |
|
||||
And the places
|
||||
| osm | class | type | housenr | geometry |
|
||||
| N1 | place | house | 2 | :n-middle-w |
|
||||
| N2 | place | house | 6 | :n-middle-e |
|
||||
| osm | class | type | housenr |
|
||||
| N1 | place | house | 2 |
|
||||
| N2 | place | house | 6 |
|
||||
And the places
|
||||
| osm | class | type | addr+interpolation | geometry |
|
||||
| W10 | place | houses | even | :w-middle |
|
||||
| W10 | place | houses | even | 1,2 |
|
||||
And the places
|
||||
| osm | class | type | name | geometry |
|
||||
| W2 | highway | unclassified | Sun Way | :w-north |
|
||||
| W3 | highway | unclassified | Cloud Street | :w-south |
|
||||
| W2 | highway | unclassified | Sun Way | 10,11 |
|
||||
| W3 | highway | unclassified | Cloud Street | 20,21 |
|
||||
And the ways
|
||||
| id | nodes |
|
||||
| 10 | 1,100,101,102,2 |
|
||||
| 10 | 1,2 |
|
||||
When importing
|
||||
Then placex contains
|
||||
| object | parent_place_id |
|
||||
@@ -88,9 +100,9 @@ Feature: Update of address interpolations
|
||||
| parent_place_id | start | end |
|
||||
| W2 | 4 | 4 |
|
||||
When updating places
|
||||
| osm | class | type | street | housenr | geometry |
|
||||
| N1 | place | house | Cloud Street| 2 | :n-middle-w |
|
||||
| N2 | place | house | Cloud Street| 6 | :n-middle-e |
|
||||
| osm | class | type | street | housenr |
|
||||
| N1 | place | house | Cloud Street| 2 |
|
||||
| N2 | place | house | Cloud Street| 6 |
|
||||
Then placex contains
|
||||
| object | parent_place_id |
|
||||
| N1 | W3 |
|
||||
@@ -100,21 +112,25 @@ Feature: Update of address interpolations
|
||||
| W3 | 4 | 4 |
|
||||
|
||||
Scenario: interpolation tag removed
|
||||
Given the scene parallel-road
|
||||
Given the grid
|
||||
| 10 | | | | 11 |
|
||||
| | 1 | | 2 | |
|
||||
| | | | | |
|
||||
| 20 | | | | 21 |
|
||||
And the places
|
||||
| osm | class | type | housenr | geometry |
|
||||
| N1 | place | house | 2 | :n-middle-w |
|
||||
| N2 | place | house | 6 | :n-middle-e |
|
||||
| osm | class | type | housenr |
|
||||
| N1 | place | house | 2 |
|
||||
| N2 | place | house | 6 |
|
||||
And the places
|
||||
| osm | class | type | addr+interpolation | geometry |
|
||||
| W10 | place | houses | even | :w-middle |
|
||||
| W10 | place | houses | even | 1,2 |
|
||||
And the places
|
||||
| osm | class | type | name | geometry |
|
||||
| W2 | highway | unclassified | Sun Way | :w-north |
|
||||
| W3 | highway | unclassified | Cloud Street | :w-south |
|
||||
| W2 | highway | unclassified | Sun Way | 10,11 |
|
||||
| W3 | highway | unclassified | Cloud Street | 20,21 |
|
||||
And the ways
|
||||
| id | nodes |
|
||||
| 10 | 1,100,101,102,2 |
|
||||
| 10 | 1,2 |
|
||||
When importing
|
||||
Then placex contains
|
||||
| object | parent_place_id |
|
||||
@@ -131,20 +147,24 @@ Feature: Update of address interpolations
|
||||
| N2 | W2 |
|
||||
|
||||
Scenario: referenced road added
|
||||
Given the scene parallel-road
|
||||
Given the grid
|
||||
| 10 | | | | 11 |
|
||||
| | 1 | | 2 | |
|
||||
| | | | | |
|
||||
| 20 | | | | 21 |
|
||||
And the places
|
||||
| osm | class | type | housenr | geometry |
|
||||
| N1 | place | house | 2 | :n-middle-w |
|
||||
| N2 | place | house | 6 | :n-middle-e |
|
||||
| osm | class | type | housenr |
|
||||
| N1 | place | house | 2 |
|
||||
| N2 | place | house | 6 |
|
||||
And the places
|
||||
| osm | class | type | addr+interpolation | street | geometry |
|
||||
| W10 | place | houses | even | Cloud Street| :w-middle |
|
||||
| W10 | place | houses | even | Cloud Street| 1,2 |
|
||||
And the places
|
||||
| osm | class | type | name | geometry |
|
||||
| W2 | highway | unclassified | Sun Way | :w-north |
|
||||
| W2 | highway | unclassified | Sun Way | 10,11 |
|
||||
And the ways
|
||||
| id | nodes |
|
||||
| 10 | 1,100,101,102,2 |
|
||||
| 10 | 1,2 |
|
||||
When importing
|
||||
Then placex contains
|
||||
| object | parent_place_id |
|
||||
@@ -155,7 +175,7 @@ Feature: Update of address interpolations
|
||||
| W2 | 4 | 4 |
|
||||
When updating places
|
||||
| osm | class | type | name | geometry |
|
||||
| W3 | highway | unclassified | Cloud Street | :w-south |
|
||||
| W3 | highway | unclassified | Cloud Street | 20,21 |
|
||||
Then placex contains
|
||||
| object | parent_place_id |
|
||||
| N1 | W3 |
|
||||
@@ -165,21 +185,25 @@ Feature: Update of address interpolations
|
||||
| W3 | 4 | 4 |
|
||||
|
||||
Scenario: referenced road deleted
|
||||
Given the scene parallel-road
|
||||
Given the grid
|
||||
| 10 | | | | 11 |
|
||||
| | 1 | | 2 | |
|
||||
| | | | | |
|
||||
| 20 | | | | 21 |
|
||||
And the places
|
||||
| osm | class | type | housenr | geometry |
|
||||
| N1 | place | house | 2 | :n-middle-w |
|
||||
| N2 | place | house | 6 | :n-middle-e |
|
||||
| osm | class | type | housenr |
|
||||
| N1 | place | house | 2 |
|
||||
| N2 | place | house | 6 |
|
||||
And the places
|
||||
| osm | class | type | addr+interpolation | street | geometry |
|
||||
| W10 | place | houses | even | Cloud Street| :w-middle |
|
||||
| W10 | place | houses | even | Cloud Street| 1,2 |
|
||||
And the places
|
||||
| osm | class | type | name | geometry |
|
||||
| W2 | highway | unclassified | Sun Way | :w-north |
|
||||
| W3 | highway | unclassified | Cloud Street | :w-south |
|
||||
| W2 | highway | unclassified | Sun Way | 10,11 |
|
||||
| W3 | highway | unclassified | Cloud Street | 20,21 |
|
||||
And the ways
|
||||
| id | nodes |
|
||||
| 10 | 1,100,101,102,2 |
|
||||
| 10 | 1,2 |
|
||||
When importing
|
||||
Then placex contains
|
||||
| object | parent_place_id |
|
||||
@@ -198,79 +222,85 @@ Feature: Update of address interpolations
|
||||
| W2 | 4 | 4 |
|
||||
|
||||
Scenario: building becomes interpolation
|
||||
Given the scene building-with-parallel-streets
|
||||
Given the grid
|
||||
| 10 | | | | 11 |
|
||||
| | 1 | | 2 | |
|
||||
| | 4 | | 3 | |
|
||||
And the places
|
||||
| osm | class | type | housenr | geometry |
|
||||
| W1 | place | house | 3 | :w-building |
|
||||
| osm | class | type | housenr | geometry |
|
||||
| W1 | place | house | 3 | (1,2,3,4,1) |
|
||||
And the places
|
||||
| osm | class | type | name | geometry |
|
||||
| W2 | highway | unclassified | Cloud Street | :w-south |
|
||||
| W2 | highway | unclassified | Cloud Street | 10,11 |
|
||||
When importing
|
||||
Then placex contains
|
||||
| object | parent_place_id |
|
||||
| W1 | W2 |
|
||||
Given the ways
|
||||
| id | nodes |
|
||||
| 1 | 1,100,101,102,2 |
|
||||
| 1 | 1,2 |
|
||||
When updating places
|
||||
| osm | class | type | housenr | geometry |
|
||||
| N1 | place | house | 2 | :n-north-w |
|
||||
| N2 | place | house | 6 | :n-north-e |
|
||||
| osm | class | type | housenr |
|
||||
| N1 | place | house | 2 |
|
||||
| N2 | place | house | 6 |
|
||||
And updating places
|
||||
| osm | class | type | addr+interpolation | street | geometry |
|
||||
| W1 | place | houses | even | Cloud Street| :w-north |
|
||||
| W1 | place | houses | even | Cloud Street| 1,2 |
|
||||
Then placex has no entry for W1
|
||||
And W1 expands to interpolation
|
||||
| parent_place_id | start | end |
|
||||
| W2 | 4 | 4 |
|
||||
|
||||
Scenario: interpolation becomes building
|
||||
Given the scene building-with-parallel-streets
|
||||
Given the grid
|
||||
| 10 | | | | 11 |
|
||||
| | 1 | | 2 | |
|
||||
| | 4 | | 3 | |
|
||||
And the places
|
||||
| osm | class | type | housenr | geometry |
|
||||
| N1 | place | house | 2 | :n-north-w |
|
||||
| N2 | place | house | 6 | :n-north-e |
|
||||
| osm | class | type | housenr |
|
||||
| N1 | place | house | 2 |
|
||||
| N2 | place | house | 6 |
|
||||
And the places
|
||||
| osm | class | type | name | geometry |
|
||||
| W2 | highway | unclassified | Cloud Street | :w-south |
|
||||
| W2 | highway | unclassified | Cloud Street | 10,11 |
|
||||
And the ways
|
||||
| id | nodes |
|
||||
| 1 | 1,100,101,102,2 |
|
||||
| 1 | 1,2 |
|
||||
And the places
|
||||
| osm | class | type | addr+interpolation | street | geometry |
|
||||
| W1 | place | houses | even | Cloud Street| :w-north |
|
||||
| W1 | place | houses | even | Cloud Street| 1,2 |
|
||||
When importing
|
||||
Then placex has no entry for W1
|
||||
And W1 expands to interpolation
|
||||
| parent_place_id | start | end |
|
||||
| W2 | 4 | 4 |
|
||||
When updating places
|
||||
| osm | class | type | housenr | geometry |
|
||||
| W1 | place | house | 3 | :w-building |
|
||||
| osm | class | type | housenr | geometry |
|
||||
| W1 | place | house | 3 | (1,2,3,4,1) |
|
||||
Then placex contains
|
||||
| object | parent_place_id |
|
||||
| W1 | W2 |
|
||||
And W1 expands to no interpolation
|
||||
|
||||
Scenario: housenumbers added to interpolation
|
||||
Given the scene building-with-parallel-streets
|
||||
Given the grid
|
||||
| 10 | | | | 11 |
|
||||
| | 1 | | 2 | |
|
||||
And the places
|
||||
| osm | class | type | name | geometry |
|
||||
| W2 | highway | unclassified | Cloud Street | :w-south |
|
||||
| W2 | highway | unclassified | Cloud Street | 10,11 |
|
||||
And the ways
|
||||
| id | nodes |
|
||||
| 1 | 1,100,101,102,2 |
|
||||
| 1 | 1,2 |
|
||||
And the places
|
||||
| osm | class | type | addr+interpolation | geometry |
|
||||
| W1 | place | houses | even | :w-north |
|
||||
| W1 | place | houses | even | 1,2 |
|
||||
When importing
|
||||
Then W1 expands to no interpolation
|
||||
When updating places
|
||||
| osm | class | type | housenr | geometry |
|
||||
| N1 | place | house | 2 | :n-north-w |
|
||||
| N2 | place | house | 6 | :n-north-e |
|
||||
And updating places
|
||||
| osm | class | type | addr+interpolation | street | geometry |
|
||||
| W1 | place | houses | even | Cloud Street| :w-north |
|
||||
| osm | class | type | housenr |
|
||||
| N1 | place | house | 2 |
|
||||
| N2 | place | house | 6 |
|
||||
Then W1 expands to interpolation
|
||||
| parent_place_id | start | end |
|
||||
| W2 | 4 | 4 |
|
||||
|
||||
@@ -3,33 +3,44 @@ Feature: Updates of linked places
|
||||
Tests that linked places are correctly added and deleted.
|
||||
|
||||
Scenario: Linking is kept when boundary is updated
|
||||
Given the 0.1 grid
|
||||
| 10 | | 11 |
|
||||
| | 1 | |
|
||||
| 13 | | 12 |
|
||||
Given the places
|
||||
| osm | class | type | name | geometry |
|
||||
| N1 | place | city | foo | 0 0 |
|
||||
| osm | class | type | name |
|
||||
| N1 | place | city | foo |
|
||||
And the places
|
||||
| osm | class | type | name | admin | geometry |
|
||||
| R1 | boundary | administrative | foo | 8 | poly-area:0.1 |
|
||||
| R1 | boundary | administrative | foo | 8 | (10,11,12,13,10) |
|
||||
When importing
|
||||
Then placex contains
|
||||
| object | linked_place_id |
|
||||
| N1 | R1 |
|
||||
When updating places
|
||||
| osm | class | type | name | name+name:de | admin | geometry |
|
||||
| R1 | boundary | administrative | foo | Dingens | 8 | poly-area:0.1 |
|
||||
| R1 | boundary | administrative | foo | Dingens | 8 | (10,11,12,13,10) |
|
||||
Then placex contains
|
||||
| object | linked_place_id |
|
||||
| N1 | R1 |
|
||||
|
||||
|
||||
Scenario: Add linked place when linking relation is renamed
|
||||
Given the 0.1 grid
|
||||
| 10 | | 11 |
|
||||
| | 1 | |
|
||||
| 13 | | 12 |
|
||||
Given the places
|
||||
| osm | class | type | name | geometry |
|
||||
| N1 | place | city | foo | 0 0 |
|
||||
| osm | class | type | name |
|
||||
| N1 | place | city | foo |
|
||||
And the places
|
||||
| osm | class | type | name | admin | geometry |
|
||||
| R1 | boundary | administrative | foo | 8 | poly-area:0.1 |
|
||||
| R1 | boundary | administrative | foo | 8 | (10,11,12,13,10) |
|
||||
When importing
|
||||
And sending search query "foo"
|
||||
Then placex contains
|
||||
| object | linked_place_id |
|
||||
| N1 | R1 |
|
||||
When sending search query "foo"
|
||||
| dups |
|
||||
| 1 |
|
||||
Then results contain
|
||||
@@ -37,7 +48,7 @@ Feature: Updates of linked places
|
||||
| R |
|
||||
When updating places
|
||||
| osm | class | type | name | admin | geometry |
|
||||
| R1 | boundary | administrative | foobar | 8 | poly-area:0.1 |
|
||||
| R1 | boundary | administrative | foobar | 8 | (10,11,12,13,10) |
|
||||
Then placex contains
|
||||
| object | linked_place_id |
|
||||
| N1 | - |
|
||||
@@ -49,12 +60,16 @@ Feature: Updates of linked places
|
||||
| N |
|
||||
|
||||
Scenario: Add linked place when linking relation is removed
|
||||
Given the 0.1 grid
|
||||
| 10 | | 11 |
|
||||
| | 1 | |
|
||||
| 13 | | 12 |
|
||||
Given the places
|
||||
| osm | class | type | name | geometry |
|
||||
| N1 | place | city | foo | 0 0 |
|
||||
| osm | class | type | name |
|
||||
| N1 | place | city | foo |
|
||||
And the places
|
||||
| osm | class | type | name | admin | geometry |
|
||||
| R1 | boundary | administrative | foo | 8 | poly-area:0.1 |
|
||||
| R1 | boundary | administrative | foo | 8 | (10,11,12,13,10) |
|
||||
When importing
|
||||
And sending search query "foo"
|
||||
| dups |
|
||||
@@ -74,9 +89,13 @@ Feature: Updates of linked places
|
||||
| N |
|
||||
|
||||
Scenario: Remove linked place when linking relation is added
|
||||
Given the 0.1 grid
|
||||
| 10 | | 11 |
|
||||
| | 1 | |
|
||||
| 13 | | 12 |
|
||||
Given the places
|
||||
| osm | class | type | name | geometry |
|
||||
| N1 | place | city | foo | 0 0 |
|
||||
| osm | class | type | name |
|
||||
| N1 | place | city | foo |
|
||||
When importing
|
||||
And sending search query "foo"
|
||||
| dups |
|
||||
@@ -86,7 +105,7 @@ Feature: Updates of linked places
|
||||
| N |
|
||||
When updating places
|
||||
| osm | class | type | name | admin | geometry |
|
||||
| R1 | boundary | administrative | foo | 8 | poly-area:0.1 |
|
||||
| R1 | boundary | administrative | foo | 8 | (10,11,12,13,10) |
|
||||
Then placex contains
|
||||
| object | linked_place_id |
|
||||
| N1 | R1 |
|
||||
@@ -98,12 +117,16 @@ Feature: Updates of linked places
|
||||
| R |
|
||||
|
||||
Scenario: Remove linked place when linking relation is renamed
|
||||
Given the 0.1 grid
|
||||
| 10 | | 11 |
|
||||
| | 1 | |
|
||||
| 13 | | 12 |
|
||||
Given the places
|
||||
| osm | class | type | name | geometry |
|
||||
| N1 | place | city | foo | 0 0 |
|
||||
| osm | class | type | name |
|
||||
| N1 | place | city | foo |
|
||||
And the places
|
||||
| osm | class | type | name | admin | geometry |
|
||||
| R1 | boundary | administrative | foobar | 8 | poly-area:0.1 |
|
||||
| R1 | boundary | administrative | foobar | 8 | (10,11,12,13,10) |
|
||||
When importing
|
||||
And sending search query "foo"
|
||||
| dups |
|
||||
@@ -113,7 +136,7 @@ Feature: Updates of linked places
|
||||
| N |
|
||||
When updating places
|
||||
| osm | class | type | name | admin | geometry |
|
||||
| R1 | boundary | administrative | foo | 8 | poly-area:0.1 |
|
||||
| R1 | boundary | administrative | foo | 8 | (10,11,12,13,10) |
|
||||
Then placex contains
|
||||
| object | linked_place_id |
|
||||
| N1 | R1 |
|
||||
@@ -125,12 +148,16 @@ Feature: Updates of linked places
|
||||
| R |
|
||||
|
||||
Scenario: Update linking relation when linkee name is updated
|
||||
Given the 0.1 grid
|
||||
| 10 | | 11 |
|
||||
| | 3 | |
|
||||
| 13 | | 12 |
|
||||
Given the places
|
||||
| osm | class | type | name | admin | geometry |
|
||||
| R1 | boundary | administrative | rel | 8 | poly-area:0.1 |
|
||||
| R1 | boundary | administrative | rel | 8 | (10,11,12,13,10) |
|
||||
And the places
|
||||
| osm | class | type | name+name:de | admin | geometry |
|
||||
| N3 | place | city | pnt | 30 | 0.00001 0 |
|
||||
| osm | class | type | name+name:de |
|
||||
| N3 | place | city | pnt |
|
||||
And the relations
|
||||
| id | members |
|
||||
| 1 | N3:label |
|
||||
@@ -142,8 +169,8 @@ Feature: Updates of linked places
|
||||
| object | linked_place_id | name+name:de |
|
||||
| N3 | R1 | pnt |
|
||||
When updating places
|
||||
| osm | class | type | name+name:de | admin | geometry |
|
||||
| N3 | place | city | newname | 30 | 0.00001 0 |
|
||||
| osm | class | type | name+name:de |
|
||||
| N3 | place | city | newname |
|
||||
Then placex contains
|
||||
| object | linked_place_id | name+name:de |
|
||||
| N3 | R1 | newname |
|
||||
@@ -152,12 +179,16 @@ Feature: Updates of linked places
|
||||
| R1 | - | newname |
|
||||
|
||||
Scenario: Update linking relation when linkee name is deleted
|
||||
Given the 0.1 grid
|
||||
| 10 | | 11 |
|
||||
| | 3 | |
|
||||
| 13 | | 12 |
|
||||
Given the places
|
||||
| osm | class | type | name | admin | geometry |
|
||||
| R1 | boundary | administrative | rel | 8 | poly-area:0.1 |
|
||||
| R1 | boundary | administrative | rel | 8 | (10,11,12,13,10) |
|
||||
And the places
|
||||
| osm | class | type | name | admin | geometry |
|
||||
| N3 | place | city | pnt | 30 | 0.00001 0 |
|
||||
| osm | class | type | name |
|
||||
| N3 | place | city | pnt |
|
||||
And the relations
|
||||
| id | members |
|
||||
| 1 | N3:label |
|
||||
@@ -173,8 +204,8 @@ Feature: Updates of linked places
|
||||
| osm |
|
||||
| R1 |
|
||||
When updating places
|
||||
| osm | class | type | name+name:de | admin | geometry |
|
||||
| N3 | place | city | depnt | 30 | 0.00001 0 |
|
||||
| osm | class | type | name+name:de |
|
||||
| N3 | place | city | depnt |
|
||||
Then placex contains
|
||||
| object | linked_place_id | name+name:de |
|
||||
| N3 | R1 | depnt |
|
||||
@@ -185,12 +216,16 @@ Feature: Updates of linked places
|
||||
Then exactly 0 results are returned
|
||||
|
||||
Scenario: Updating linkee extratags keeps linker's extratags
|
||||
Given the 0.1 grid
|
||||
| 10 | | 11 |
|
||||
| | 3 | |
|
||||
| 13 | | 12 |
|
||||
Given the named places
|
||||
| osm | class | type | extra+wikidata | admin | geometry |
|
||||
| R1 | boundary | administrative | 34 | 8 | poly-area:0.1 |
|
||||
| R1 | boundary | administrative | 34 | 8 | (10,11,12,13,10) |
|
||||
And the named places
|
||||
| osm | class | type | geometry |
|
||||
| N3 | place | city | 0.00001 0 |
|
||||
| osm | class | type |
|
||||
| N3 | place | city |
|
||||
And the relations
|
||||
| id | members |
|
||||
| 1 | N3:label |
|
||||
@@ -199,19 +234,23 @@ Feature: Updates of linked places
|
||||
| object | extratags |
|
||||
| R1 | 'wikidata' : '34', 'linked_place' : 'city' |
|
||||
When updating places
|
||||
| osm | class | type | name | extra+oneway | admin | geometry |
|
||||
| N3 | place | city | newname | yes | 30 | 0.00001 0 |
|
||||
| osm | class | type | name | extra+oneway |
|
||||
| N3 | place | city | newname | yes |
|
||||
Then placex contains
|
||||
| object | extratags |
|
||||
| R1 | 'wikidata' : '34', 'oneway' : 'yes', 'linked_place' : 'city' |
|
||||
|
||||
Scenario: Remove linked_place info when linkee is removed
|
||||
Given the 0.1 grid
|
||||
| 10 | | 11 |
|
||||
| | 1 | |
|
||||
| 13 | | 12 |
|
||||
Given the places
|
||||
| osm | class | type | name | geometry |
|
||||
| N1 | place | city | foo | 0 0 |
|
||||
| osm | class | type | name |
|
||||
| N1 | place | city | foo |
|
||||
And the places
|
||||
| osm | class | type | name | admin | geometry |
|
||||
| R1 | boundary | administrative | foo | 8 | poly-area:0.1 |
|
||||
| R1 | boundary | administrative | foo | 8 | (10,11,12,13,10) |
|
||||
When importing
|
||||
Then placex contains
|
||||
| object | extratags |
|
||||
@@ -222,19 +261,23 @@ Feature: Updates of linked places
|
||||
| R1 | |
|
||||
|
||||
Scenario: Update linked_place info when linkee type changes
|
||||
Given the 0.1 grid
|
||||
| 10 | | 11 |
|
||||
| | 1 | |
|
||||
| 13 | | 12 |
|
||||
Given the places
|
||||
| osm | class | type | name | geometry |
|
||||
| N1 | place | city | foo | 0 0 |
|
||||
| osm | class | type | name |
|
||||
| N1 | place | city | foo |
|
||||
And the places
|
||||
| osm | class | type | name | admin | geometry |
|
||||
| R1 | boundary | administrative | foo | 8 | poly-area:0.1 |
|
||||
| R1 | boundary | administrative | foo | 8 | (10,11,12,13,10) |
|
||||
When importing
|
||||
Then placex contains
|
||||
| object | extratags |
|
||||
| R1 | 'linked_place' : 'city' |
|
||||
When updating places
|
||||
| osm | class | type | name | geometry |
|
||||
| N1 | place | town | foo | 0 0 |
|
||||
| osm | class | type | name |
|
||||
| N1 | place | town | foo |
|
||||
Then placex contains
|
||||
| object | extratags |
|
||||
| R1 | 'linked_place' : 'town' |
|
||||
|
||||
@@ -3,9 +3,12 @@ Feature: Update of names in place objects
|
||||
Test all naming related issues in updates
|
||||
|
||||
Scenario: Delete postcode from postcode boundaries without ref
|
||||
Given the grid with origin DE
|
||||
| 1 | 2 |
|
||||
| 4 | 3 |
|
||||
Given the places
|
||||
| osm | class | type | postcode | geometry |
|
||||
| R1 | boundary | postal_code | 12345 | poly-area:0.5 |
|
||||
| R1 | boundary | postal_code | 12345 | (1,2,3,4,1) |
|
||||
When importing
|
||||
And sending search query "12345"
|
||||
Then results contain
|
||||
@@ -13,6 +16,6 @@ Feature: Update of names in place objects
|
||||
| 0 | R1 |
|
||||
When updating places
|
||||
| osm | class | type | geometry |
|
||||
| R1 | boundary | postal_code | poly-area:0.5 |
|
||||
| R1 | boundary | postal_code | (1,2,3,4,1) |
|
||||
Then placex has no entry for R1
|
||||
|
||||
|
||||
@@ -2,38 +2,37 @@
|
||||
Feature: Update parenting of objects
|
||||
|
||||
Scenario: POI inside building inherits addr:street change
|
||||
Given the scene building-on-street-corner
|
||||
Given the grid
|
||||
| 10 | | | | | | | 11 |
|
||||
| | | 5 | | | 6 | | |
|
||||
| | | | | | | | |
|
||||
| | | | | 1 | | | |
|
||||
| 12 | | 8 | | | 7 | | |
|
||||
And the named places
|
||||
| osm | class | type | geometry |
|
||||
| N1 | amenity | bank | :n-inner |
|
||||
| N2 | shop | bakery | :n-edge-NS |
|
||||
| N3 | shop | supermarket| :n-edge-WE |
|
||||
| osm | class | type |
|
||||
| N1 | amenity | bank |
|
||||
And the places
|
||||
| osm | class | type | street | housenr | geometry |
|
||||
| W1 | building | yes | nowhere | 3 | :w-building |
|
||||
| W1 | building | yes | nowhere | 3 | (5,6,7,8,5) |
|
||||
And the places
|
||||
| osm | class | type | name | geometry |
|
||||
| W2 | highway | primary | bar | :w-WE |
|
||||
| W3 | highway | residential | foo | :w-NS |
|
||||
| W2 | highway | primary | bar | 10,11 |
|
||||
| W3 | highway | residential | foo | 10,12 |
|
||||
When importing
|
||||
Then placex contains
|
||||
| object | parent_place_id | housenumber |
|
||||
| W1 | W2 | 3 |
|
||||
| N1 | W3 | 3 |
|
||||
| N2 | W3 | 3 |
|
||||
| N3 | W2 | 3 |
|
||||
| N1 | W2 | 3 |
|
||||
When updating places
|
||||
| osm | class | type | street | addr_place | housenr | geometry |
|
||||
| W1 | building | yes | foo | nowhere | 3 | :w-building |
|
||||
| W1 | building | yes | foo | nowhere | 3 | (5,6,7,8,5) |
|
||||
And updating places
|
||||
| osm | class | type | name | geometry |
|
||||
| N3 | shop | supermarket| well | :n-edge-WE |
|
||||
| osm | class | type | name |
|
||||
| N1 | amenity | bank | well |
|
||||
Then placex contains
|
||||
| object | parent_place_id | housenumber |
|
||||
| W1 | W3 | 3 |
|
||||
| N1 | W3 | 3 |
|
||||
| N2 | W3 | 3 |
|
||||
| N3 | W3 | 3 |
|
||||
|
||||
|
||||
Scenario: Housenumber is reparented when street gets name matching addr:street
|
||||
|
||||
@@ -38,13 +38,13 @@ Feature: Update of postcode
|
||||
Given the places
|
||||
| osm | class | type | addr+postcode | addr+housenumber | geometry |
|
||||
| N34 | place | house | 01982 | 111 |country:de |
|
||||
| N35 | place | house | 01982 | 5 |country:ch |
|
||||
| N35 | place | house | 01982 | 5 |country:fr |
|
||||
When importing
|
||||
And marking for delete N34
|
||||
And updating postcodes
|
||||
Then location_postcode contains exactly
|
||||
| country | postcode | geometry |
|
||||
| ch | 01982 | country:ch |
|
||||
| fr | 01982 | country:fr |
|
||||
And there are word tokens for postcodes 01982
|
||||
|
||||
Scenario: Updating a postcode is reflected in postcode table
|
||||
|
||||
@@ -3,9 +3,12 @@ Feature: Update of simple objects
|
||||
Testing simple updating functionality
|
||||
|
||||
Scenario: Do delete small boundary features
|
||||
Given the 1.0 grid
|
||||
| 1 | 2 |
|
||||
| 4 | 3 |
|
||||
Given the places
|
||||
| osm | class | type | admin | geometry |
|
||||
| R1 | boundary | administrative | 3 | poly-area:1.0 |
|
||||
| R1 | boundary | administrative | 3 | (1,2,3,4,1) |
|
||||
When importing
|
||||
Then placex contains
|
||||
| object | rank_search |
|
||||
@@ -14,24 +17,30 @@ Feature: Update of simple objects
|
||||
Then placex has no entry for R1
|
||||
|
||||
Scenario: Do not delete large boundary features
|
||||
Given the 2.0 grid
|
||||
| 1 | 2 |
|
||||
| 4 | 3 |
|
||||
Given the places
|
||||
| osm | class | type | admin | geometry |
|
||||
| R1 | boundary | administrative | 3 | poly-area:5.0 |
|
||||
| R1 | boundary | administrative | 3 | (1,2,3,4,1) |
|
||||
When importing
|
||||
Then placex contains
|
||||
| object | rank_search |
|
||||
| R1 | 6 |
|
||||
When marking for delete R1
|
||||
Then placex contains
|
||||
Then placex contains
|
||||
| object | rank_search |
|
||||
| R1 | 6 |
|
||||
|
||||
Scenario: Do delete large features of low rank
|
||||
Given the 2.0 grid
|
||||
| 1 | 2 |
|
||||
| 4 | 3 |
|
||||
Given the named places
|
||||
| osm | class | type | geometry |
|
||||
| W1 | place | house | poly-area:5.0 |
|
||||
| R1 | natural | wood | poly-area:5.0 |
|
||||
| R2 | highway | residential | poly-area:5.0 |
|
||||
| W1 | place | house | (1,2,3,4,1) |
|
||||
| R1 | natural | wood | (1,2,3,4,1) |
|
||||
| R2 | highway | residential | (1,2,3,4,1) |
|
||||
When importing
|
||||
Then placex contains
|
||||
| object | rank_address |
|
||||
@@ -61,12 +70,12 @@ Feature: Update of simple objects
|
||||
Scenario: remove postcode place when house number is added
|
||||
Given the places
|
||||
| osm | class | type | postcode | geometry |
|
||||
| N3 | place | postcode | 12345 | 1 -1 |
|
||||
| N3 | place | postcode | 12345 | country:de |
|
||||
When importing
|
||||
Then placex has no entry for N3
|
||||
When updating places
|
||||
| osm | class | type | postcode | housenr | geometry |
|
||||
| N3 | place | house | 12345 | 13 | 1 -1 |
|
||||
| N3 | place | house | 12345 | 13 | country:de |
|
||||
Then placex contains
|
||||
| object | class | type |
|
||||
| N3 | place | house |
|
||||
|
||||
@@ -142,6 +142,11 @@ def delete_places(context, oids):
|
||||
|
||||
context.nominatim.reindex_placex(context.db)
|
||||
|
||||
# Remove the output of the input, when all was right. Otherwise it will be
|
||||
# output when there are errors that had nothing to do with the import
|
||||
# itself.
|
||||
context.log_capture.buffer.clear()
|
||||
|
||||
################################ THEN ##################################
|
||||
|
||||
@then("(?P<table>placex|place) contains(?P<exact> exactly)?")
|
||||
|
||||
Reference in New Issue
Block a user