From: Sarah Hoffmann Date: Fri, 17 Jun 2022 13:25:29 +0000 (+0200) Subject: Merge pull request #2748 from lonvia/bdd-grid-origin X-Git-Tag: v4.1.0~28 X-Git-Url: https://git.openstreetmap.org/nominatim.git/commitdiff_plain/8fb9795d04aec07ae9d30e6a53b59403c119729f?hp=3d0f8bdc39d08c00b57ac18fc6483a6774129bb4 Merge pull request #2748 from lonvia/bdd-grid-origin BDD tests: remove support for scenes --- diff --git a/docs/develop/Testing.md b/docs/develop/Testing.md index e2b01b8d..20c9d165 100644 --- a/docs/develop/Testing.md +++ b/docs/develop/Testing.md @@ -22,8 +22,8 @@ This test directory is sturctured as follows: | +- php PHP unit tests +- python Python unit tests - +- scenes Geometry test data +- testdb Base data for generating API test database + +- testdata Additional test data used by unit tests ``` ## PHP Unit Tests (`test/php`) diff --git a/test/bdd/db/import/addressing.feature b/test/bdd/db/import/addressing.feature index 1d6ba5bd..e72ff448 100644 --- a/test/bdd/db/import/addressing.feature +++ b/test/bdd/db/import/addressing.feature @@ -253,38 +253,52 @@ Feature: Address computation | W1 | W10 | Scenario: buildings with only addr:postcodes do not appear in the address of a way - Given the scene admin-areas + Given the grid with origin DE + | 1 | | | | | 8 | | 6 | | 2 | + | |10 |11 | | | | | | | | + | |13 |12 | | | | | | | | + | 20| | | 21| | | | | | | + | | | | | | | | | | | + | | | | | | 9 | | | | | + | 4 | | | | | | | 7 | | 3 | And the named places - | osm | class | type | admin | addr+postcode | geometry | - | R1 | boundary | administrative | 6 | 112 | :b0 | - | R34 | boundary | administrative | 8 | 112 DE | :b1:E | - | R4 | boundary | administrative | 10 | 112 DE 34 | :b2:N | + | osm | class | type | admin | addr+postcode | geometry | + | R1 | boundary | administrative | 6 | 10000 | (1,2,3,4,1)| + | R34 | boundary | administrative | 8 | 11200 | (1,6,7,4,1)| + | R4 | boundary | administrative | 10 | 11230 | (1,8,9,4,1)| And the named places | osm | class | type | geometry | - | W93 | highway | residential | :w2N | + | W93 | highway | residential | 20,21 | And the places | osm | class | type | addr+postcode | geometry | - | W22 | place | postcode | 445023 | :building:w2N | + | W22 | place | postcode | 11234 | (10,11,12,13,10) | When importing Then place_addressline doesn't contain | object | address | | W93 | W22 | Scenario: postcode boundaries do appear in the address of a way - Given the scene admin-areas + Given the grid with origin DE + | 1 | | | | | 8 | | 6 | | 2 | + | |10 |11 | | | | | | | | + | |13 |12 | | | | | | | | + | 20| | | 21| | | | | | | + | | | | | | | | | | | + | | | | | | 9 | | | | | + | 4 | | | | | | | 7 | | 3 | And the named places - | osm | class | type | admin | addr+postcode | geometry | - | R1 | boundary | administrative | 6 | 112 | :b0 | - | R34 | boundary | administrative | 8 | 112 DE | :b1:E | + | osm | class | type | admin | addr+postcode | geometry | + | R1 | boundary | administrative | 6 | 10000 | (1,2,3,4,1) | + | R34 | boundary | administrative | 8 | 11000 | (1,6,7,4,1) | And the places | osm | class | type | addr+postcode | geometry | - | R4 | boundary | postal_code | 112 DE 34 | :b2:N | + | R4 | boundary | postal_code | 11200 | (1,8,9,4,1) | And the named places | osm | class | type | geometry | - | W93 | highway | residential | :w2N | + | W93 | highway | residential | 20,21 | And the places | osm | class | type | addr+postcode | geometry | - | W22 | place | postcode | 445023 | :building:w2N | + | W22 | place | postcode | 11234 | (10,11,12,13,10) | When importing Then place_addressline contains | object | address | diff --git a/test/bdd/db/import/country.feature b/test/bdd/db/import/country.feature index 354d5c2f..070baeef 100644 --- a/test/bdd/db/import/country.feature +++ b/test/bdd/db/import/country.feature @@ -21,9 +21,12 @@ Feature: Country handling | osm | display_name | | N1 | Wenig, Loudou | Scenario: OSM country relations outside expected boundaries are ignored + Given the grid + | 1 | | 2 | + | 4 | | 3 | Given the places | osm | class | type | admin | name+name:xy | country | geometry | - | R1 | boundary | administrative | 2 | Loudou | de | poly-area:0.1 | + | 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 | @@ -35,9 +38,11 @@ Feature: Country handling | osm | display_name | | N1 | Wenig, Germany | Scenario: Pre-defined country names are used + Given the grid with origin CH + | 1 | Given the places | osm | class | type | name | geometry | - | N1 | place | town | Ingb | country:ch | + | N1 | place | town | Ingb | 1 | When importing And sending search query "Ingb" | accept-language | diff --git a/test/bdd/db/import/interpolation.feature b/test/bdd/db/import/interpolation.feature index 54d22962..8c136d07 100644 --- a/test/bdd/db/import/interpolation.feature +++ b/test/bdd/db/import/interpolation.feature @@ -3,229 +3,261 @@ Feature: Import of address interpolations Tests that interpolated addresses are added correctly Scenario: Simple even interpolation line with two points + Given the grid with origin 1,1 + | 1 | | 9 | | 2 | Given the places - | osm | class | type | housenr | geometry | - | N1 | place | house | 2 | 1 1 | - | N2 | place | house | 6 | 1 1.001 | + | osm | class | type | housenr | + | N1 | place | house | 2 | + | N2 | place | house | 6 | And the places | osm | class | type | addr+interpolation | geometry | - | W1 | place | houses | even | 1 1, 1 1.001 | + | W1 | place | houses | even | 1,2 | And the ways | id | nodes | | 1 | 1,2 | When importing Then W1 expands to interpolation | start | end | geometry | - | 4 | 4 | 1 1.0005 | + | 4 | 4 | 9 | Scenario: Backwards even two point interpolation line + Given the grid with origin 1,1 + | 1 | 8 | 9 | 2 | Given the places - | osm | class | type | housenr | geometry | - | N1 | place | house | 2 | 1 1 | - | N2 | place | house | 8 | 1 1.003 | + | osm | class | type | housenr | + | N1 | place | house | 2 | + | N2 | place | house | 8 | And the places | osm | class | type | addr+interpolation | geometry | - | W1 | place | houses | even | 1 1.003, 1 1 | + | W1 | place | houses | even | 1,2 | And the ways | id | nodes | | 1 | 2,1 | When importing Then W1 expands to interpolation | start | end | geometry | - | 4 | 6 | 1 1.001, 1 1.002 | + | 4 | 6 | 8,9 | Scenario: Simple odd two point interpolation + Given the grid with origin 1,1 + | 1 | 8 | | | 9 | 2 | Given the places - | osm | class | type | housenr | geometry | - | N1 | place | house | 1 | 1 1 | - | N2 | place | house | 11 | 1 1.001 | + | osm | class | type | housenr | + | N1 | place | house | 1 | + | N2 | place | house | 11 | And the places | osm | class | type | addr+interpolation | geometry | - | W1 | place | houses | odd | 1 1, 1 1.001 | + | W1 | place | houses | odd | 1,2 | And the ways | id | nodes | | 1 | 1,2 | When importing Then W1 expands to interpolation | start | end | geometry | - | 3 | 9 | 1 1.0002, 1 1.0008 | + | 3 | 9 | 8,9 | Scenario: Simple all two point interpolation + Given the grid with origin 1,1 + | 1 | 8 | 9 | 2 | Given the places - | osm | class | type | housenr | geometry | - | N1 | place | house | 1 | 1 1 | - | N2 | place | house | 4 | 1 1.003 | + | osm | class | type | housenr | + | N1 | place | house | 1 | + | N2 | place | house | 4 | And the places | osm | class | type | addr+interpolation | geometry | - | W1 | place | houses | all | 1 1, 1 1.003 | + | W1 | place | houses | all | 1,2 | And the ways | id | nodes | | 1 | 1,2 | When importing Then W1 expands to interpolation | start | end | geometry | - | 2 | 3 | 1 1.001, 1 1.002 | + | 2 | 3 | 8,9 | Scenario: Even two point interpolation line with intermediate empty node + Given the grid + | 1 | 8 | | 3 | 9 | 2 | Given the places - | osm | class | type | housenr | geometry | - | N1 | place | house | 2 | 1 1 | - | N2 | place | house | 10 | 1.001 1.001 | + | osm | class | type | housenr | + | N1 | place | house | 2 | + | N2 | place | house | 12 | And the places | osm | class | type | addr+interpolation | geometry | - | W1 | place | houses | even | 1 1, 1 1.001, 1.001 1.001 | + | W1 | place | houses | even | 1,3,2 | And the ways | id | nodes | | 1 | 1,3,2 | When importing Then W1 expands to interpolation | start | end | geometry | - | 4 | 8 | 1 1.0005, 1 1.001, 1.0005 1.001 | + | 4 | 10 | 8,3,9 | Scenario: Even two point interpolation line with intermediate duplicated empty node + Given the grid + | 1 | 8 | 3 | 9 | 2 | Given the places - | osm | class | type | housenr | geometry | - | N1 | place | house | 2 | 1 1 | - | N2 | place | house | 10 | 1.001 1.001 | + | osm | class | type | housenr | + | N1 | place | house | 2 | + | N2 | place | house | 10 | And the places | osm | class | type | addr+interpolation | geometry | - | W1 | place | houses | even | 1 1, 1 1.001, 1.001 1.001 | + | W1 | place | houses | even | 1,3,2 | And the ways | id | nodes | | 1 | 1,3,3,2 | When importing Then W1 expands to interpolation | start | end | geometry | - | 4 | 8 | 1 1.0005, 1 1.001, 1.0005 1.001 | + | 4 | 8 | 8,3,9 | Scenario: Simple even three point interpolation line + Given the grid + | 1 | 8 | | 9 | 3 | 7 | 2 | Given the places - | osm | class | type | housenr | geometry | - | N1 | place | house | 2 | 1 1 | - | N2 | place | house | 14 | 1.001 1.001 | - | N3 | place | house | 10 | 1 1.001 | + | osm | class | type | housenr | + | N1 | place | house | 2 | + | N2 | place | house | 14 | + | N3 | place | house | 10 | And the places | osm | class | type | addr+interpolation | geometry | - | W1 | place | houses | even | 1 1, 1 1.001, 1.001 1.001 | + | W1 | place | houses | even | 1,3,2 | And the ways | id | nodes | | 1 | 1,3,2 | When importing Then W1 expands to interpolation | start | end | geometry | - | 4 | 8 | 1 1.00025, 1 1.00075 | - | 12 | 12 | 1.0005 1.001 | + | 4 | 8 | 8,9 | + | 12 | 12 | 7 | Scenario: Simple even four point interpolation line + Given the grid + | 1 | 10 | | 11 | 3 | + | | | | | 12| + | | | 4 | 13 | 2 | Given the places - | osm | class | type | housenr | geometry | - | N1 | place | house | 2 | 1 1 | - | N2 | place | house | 14 | 1.001 1.001 | - | N3 | place | house | 10 | 1 1.001 | - | N4 | place | house | 18 | 1.001 1.002 | + | osm | class | type | housenr | + | N1 | place | house | 2 | + | N2 | place | house | 14 | + | N3 | place | house | 10 | + | N4 | place | house | 18 | And the places | osm | class | type | addr+interpolation | geometry | - | W1 | place | houses | even | 1 1, 1 1.001, 1.001 1.001, 1.001 1.002 | + | W1 | place | houses | even | 1,3,2,4 | And the ways | id | nodes | | 1 | 1,3,2,4 | When importing Then W1 expands to interpolation | start | end | geometry | - | 4 | 8 | 1 1.00025, 1 1.00075 | - | 12 | 12 | 1.0005 1.001 | - | 16 | 16 | 1.001 1.0015 | + | 4 | 8 | 10,11 | + | 12 | 12 | 12 | + | 16 | 16 | 13 | Scenario: Reverse simple even three point interpolation line + Given the grid + | 1 | 8 | | 9 | 3 | 7 | 2 | Given the places - | osm | class | type | housenr | geometry | - | N1 | place | house | 2 | 1 1 | - | N2 | place | house | 14 | 1.001 1.001 | - | N3 | place | house | 10 | 1 1.001 | + | osm | class | type | housenr | + | N1 | place | house | 2 | + | N2 | place | house | 14 | + | N3 | place | house | 10 | And the places | osm | class | type | addr+interpolation | geometry | - | W1 | place | houses | even | 1.001 1.001, 1 1.001, 1 1 | + | W1 | place | houses | even | 2,3,1 | And the ways | id | nodes | | 1 | 2,3,1 | When importing Then W1 expands to interpolation | start | end | geometry | - | 4 | 8 | 1 1.00025, 1 1.00075 | - | 12 | 12 | 1.0005 1.001 | + | 4 | 8 | 8,9 | + | 12 | 12 | 7 | Scenario: Even three point interpolation line with odd center point + Given the grid + | 1 | | 10 | | | 11 | 3 | 2 | Given the places - | osm | class | type | housenr | geometry | - | N1 | place | house | 2 | 1 1 | - | N2 | place | house | 8 | 1.001 1.001 | - | N3 | place | house | 7 | 1 1.001 | + | osm | class | type | housenr | + | N1 | place | house | 2 | + | N2 | place | house | 8 | + | N3 | place | house | 7 | And the places | osm | class | type | addr+interpolation | geometry | - | W1 | place | houses | even | 1 1, 1 1.001, 1.001 1.001 | + | W1 | place | houses | even | 1,3,2 | And the ways | id | nodes | | 1 | 1,3,2 | When importing Then W1 expands to interpolation | start | end | geometry | - | 4 | 6 | 1 1.0004, 1 1.0008 | + | 4 | 6 | 10,11 | Scenario: Interpolation line with self-intersecting way + Given the grid + | 1 | 9 | 2 | + | | | 8 | + | | | 3 | Given the places - | osm | class | type | housenr | geometry | - | N1 | place | house | 2 | 0 0 | - | N2 | place | house | 6 | 0 0.001 | - | N3 | place | house | 10 | 0 0.002 | + | osm | class | type | housenr | + | N1 | place | house | 2 | + | N2 | place | house | 6 | + | N3 | place | house | 10 | And the places | osm | class | type | addr+interpolation | geometry | - | W1 | place | houses | even | 0 0, 0 0.001, 0 0.002, 0 0.001 | + | W1 | place | houses | even | 1,2,3,2 | And the ways | id | nodes | | 1 | 1,2,3,2 | When importing Then W1 expands to interpolation | start | end | geometry | - | 4 | 4 | 0 0.0005 | - | 8 | 8 | 0 0.0015 | - | 8 | 8 | 0 0.0015 | + | 4 | 4 | 9 | + | 8 | 8 | 8 | + | 8 | 8 | 8 | Scenario: Interpolation line with self-intersecting way II + Given the grid + | 1 | 9 | 2 | + | | | 3 | Given the places - | osm | class | type | housenr | geometry | - | N1 | place | house | 2 | 0 0 | - | N2 | place | house | 6 | 0 0.001 | + | osm | class | type | housenr | + | N1 | place | house | 2 | + | N2 | place | house | 6 | And the places | osm | class | type | addr+interpolation | geometry | - | W1 | place | houses | even | 0 0, 0 0.001, 0 0.002, 0 0.001 | + | W1 | place | houses | even | 1,2,3,2 | And the ways | id | nodes | | 1 | 1,2,3,2 | When importing Then W1 expands to interpolation | start | end | geometry | - | 4 | 4 | 0 0.0005 | + | 4 | 4 | 9 | Scenario: addr:street on interpolation way - Given the scene parallel-road + Given the grid + | | 1 | | 2 | | + | 10 | | | | 11 | + | 20 | | | | 21 | And the places | osm | class | type | housenr | geometry | - | N1 | place | house | 2 | :n-middle-w | - | N2 | place | house | 6 | :n-middle-e | - | N3 | place | house | 12 | :n-middle-w | - | N4 | place | house | 16 | :n-middle-e | + | N1 | place | house | 2 | 1 | + | N2 | place | house | 6 | 2 | + | N3 | place | house | 12 | 1 | + | N4 | place | house | 16 | 2 | And the places | osm | class | type | addr+interpolation | street | geometry | - | W10 | place | houses | even | | :w-middle | - | W11 | place | houses | even | Cloud Street | :w-middle | + | W10 | place | houses | even | | 1,2 | + | W11 | place | houses | even | Cloud Street | 1,2 | And the places | osm | class | type | name | geometry | - | W2 | highway | tertiary | Sun Way | :w-north | - | W3 | highway | tertiary | Cloud Street | :w-south | + | W2 | highway | tertiary | Sun Way | 10,11 | + | W3 | highway | tertiary | Cloud Street | 20,21 | And the ways | id | nodes | - | 10 | 1,100,101,102,2 | - | 11 | 3,200,201,202,4 | + | 10 | 1,2 | + | 11 | 3,4 | When importing Then placex contains | object | parent_place_id | @@ -249,25 +281,28 @@ Feature: Import of address interpolations | 0 | W | 11 | Scenario: addr:street on housenumber way - Given the scene parallel-road + Given the grid + | | 1 | | 2 | | + | 10 | | | | 11 | + | 20 | | | | 21 | And the places | osm | class | type | housenr | street | geometry | - | N1 | place | house | 2 | | :n-middle-w | - | N2 | place | house | 6 | | :n-middle-e | - | N3 | place | house | 12 | Cloud Street | :n-middle-w | - | N4 | place | house | 16 | Cloud Street | :n-middle-e | + | N1 | place | house | 2 | | 1 | + | N2 | place | house | 6 | | 2 | + | N3 | place | house | 12 | Cloud Street | 1 | + | N4 | place | house | 16 | Cloud Street | 2 | And the places | osm | class | type | addr+interpolation | geometry | - | W10 | place | houses | even | :w-middle | - | W11 | place | houses | even | :w-middle | + | W10 | place | houses | even | 1,2 | + | W11 | place | houses | even | 1,2 | And the places | osm | class | type | name | geometry | - | W2 | highway | tertiary | Sun Way | :w-north | - | W3 | highway | tertiary | Cloud Street | :w-south | + | W2 | highway | tertiary | Sun Way | 10,11 | + | W3 | highway | tertiary | Cloud Street | 20,21 | And the ways | id | nodes | - | 10 | 1,100,101,102,2 | - | 11 | 3,200,201,202,4 | + | 10 | 1,2 | + | 11 | 3,4 | When importing Then placex contains | object | parent_place_id | @@ -334,30 +369,36 @@ Feature: Import of address interpolations When importing Then W1 expands to no interpolation - Scenario: Ways without nodes without housenumbers are ignored + Scenario: Ways with nodes without housenumbers are ignored + Given the grid + | 1 | | 2 | + Given the places + | osm | class | type | + | N1 | place | house | + | N2 | place | house | Given the places | osm | class | type | housenr | geometry | - | N1 | place | house | | 1 1 | - | N2 | place | house | | 1 1.001 | - | W1 | place | houses | even | 1 1, 1 1.001 | + | W1 | place | houses | even | 1,2 | When importing Then W1 expands to no interpolation Scenario: Two point interpolation starting at 0 + Given the grid with origin 1,1 + | 1 | 10 | | | 11 | 2 | Given the places - | osm | class | type | housenr | geometry | - | N1 | place | house | 0 | 1 1 | - | N2 | place | house | 10 | 1 1.001 | + | osm | class | type | housenr | + | N1 | place | house | 0 | + | N2 | place | house | 10 | And the places | osm | class | type | addr+interpolation | geometry | - | W1 | place | houses | even | 1 1, 1 1.001 | + | W1 | place | houses | even | 1,2 | And the ways | id | nodes | | 1 | 1,2 | When importing Then W1 expands to interpolation | start | end | geometry | - | 2 | 8 | 1 1.0002, 1 1.0008 | + | 2 | 8 | 10,11 | When sending jsonv2 reverse coordinates 1,1 Then results contain | ID | osm_type | osm_id | type | display_name | diff --git a/test/bdd/db/import/linking.feature b/test/bdd/db/import/linking.feature index 915c13b3..0fb3f76d 100644 --- a/test/bdd/db/import/linking.feature +++ b/test/bdd/db/import/linking.feature @@ -3,11 +3,14 @@ Feature: Linking of places Tests for correctly determining linked places Scenario: Only address-describing places can be linked - Given the scene way-area-with-center + Given the grid + | 1 | | | | 2 | + | | | 9 | | | + | 4 | | | | 3 | And the places | osm | class | type | name | geometry | - | R13 | landuse | forest | Garbo | :area | - | N256 | natural | peak | Garbo | :inner-C | + | R13 | landuse | forest | Garbo | (1,2,3,4,1) | + | N256 | natural | peak | Garbo | 9 | When importing Then placex contains | object | linked_place_id | @@ -15,14 +18,14 @@ Feature: Linking of places | N256 | - | Scenario: Postcode areas cannot be linked - Given the grid + Given the grid with origin US | 1 | | 2 | | | 9 | | | 4 | | 3 | And the named places | osm | class | type | addr+postcode | extra+wikidata | geometry | - | R13 | boundary | postal_code | 123 | Q87493 | (1,2,3,4,1) | - | N25 | place | suburb | 123 | Q87493 | 9 | + | R13 | boundary | postal_code | 12345 | Q87493 | (1,2,3,4,1) | + | N25 | place | suburb | 12345 | Q87493 | 9 | When importing Then placex contains | object | linked_place_id | @@ -30,13 +33,16 @@ Feature: Linking of places | N25 | - | Scenario: Waterways are linked when in waterway relations - Given the scene split-road + Given the grid + | 1 | | | | 3 | 4 | | | | 6 | + | | | 2 | | | 10 | | 5 | | | + | | | | | | 11 | | | | | And the places | osm | class | type | name | geometry | - | W1 | waterway | river | Rhein | :w-2 | - | W2 | waterway | river | Rhein | :w-3 | - | R13 | waterway | river | Rhein | :w-1 + :w-2 + :w-3 | - | R23 | waterway | river | Limmat| :w-4a | + | W1 | waterway | river | Rhein | 1,2,3 | + | W2 | waterway | river | Rhein | 3,4,5 | + | R13 | waterway | river | Rhein | 1,2,3,4,5,6 | + | R23 | waterway | river | Limmat| 4,10,11 | And the relations | id | members | tags+type | | 13 | R23:tributary,W1,W2:main_stream | waterway | @@ -53,13 +59,16 @@ Feature: Linking of places | R | Scenario: Relations are not linked when in waterway relations - Given the scene split-road + Given the grid + | 1 | | | | 3 | 4 | | | | 6 | + | | | 2 | | | 10 | | 5 | | | + | | | | | | 11 | | | | | And the places | osm | class | type | name | geometry | - | W1 | waterway | stream | Rhein | :w-2 | - | W2 | waterway | river | Rhein | :w-3 | - | R1 | waterway | river | Rhein | :w-1 + :w-2 + :w-3 | - | R2 | waterway | river | Limmat| :w-4a | + | W1 | waterway | stream | Rhein | 1,2,3,4 | + | W2 | waterway | river | Rhein | 4,5,6 | + | R1 | waterway | river | Rhein | 1,2,3,4 | + | R2 | waterway | river | Limmat| 4,10,11 | And the relations | id | members | tags+type | | 1 | R2 | waterway | @@ -70,12 +79,19 @@ Feature: Linking of places | W2 | - | | R1 | - | | R2 | - | + When sending search query "rhein" + Then results contain + | ID | osm_type | + | 0 | R | + | 1 | W | + Scenario: Empty waterway relations are handled correctly - Given the scene split-road + Given the grid + | 1 | | | | 3 | And the places | osm | class | type | name | geometry | - | R1 | waterway | river | Rhein | :w-1 + :w-2 + :w-3 | + | R1 | waterway | river | Rhein | 1,3 | And the relations | id | members | tags+type | | 1 | | waterway | @@ -85,35 +101,36 @@ Feature: Linking of places | R1 | - | Scenario: Waterways are not linked when the way type is not a river feature - Given the scene split-road + Given the grid + | 1 | | 2 | + | | | | + | 3 | | 4 | And the places | osm | class | type | name | geometry | - | W1 | waterway | lock | Rhein | :w-2 | - | R1 | waterway | river | Rhein | :w-1 + :w-2 + :w-3 | + | W1 | waterway | lock | Rhein | 3,4 | + | R1 | landuse | meadow | Rhein | (3,1,2,4,3) | And the relations - | id | members | tags+type | - | 1 | N23,N34,W1,R45 | multipolygon | + | id | members | tags+type | + | 1 | W1,W2 | multipolygon | When importing Then placex contains | object | linked_place_id | | W1 | - | | R1 | - | - When sending search query "rhein" - Then results contain - | ID | osm_type | - | 0 | R | - | 1 | W | Scenario: Side streams are linked only when they have the same name - Given the scene split-road + Given the grid + | | | | | 8 | | | | + | 1 | | 2 | 3 | | 4 | 5 | 6| + | | | | | | 9 | | | And the places | osm | class | type | name | geometry | - | W1 | waterway | river | Rhein2 | :w-2 | - | W2 | waterway | river | Rhein | :w-3 | - | R1 | waterway | river | Rhein | :w-1 + :w-2 + :w-3 | + | W1 | waterway | river | Rhein2 | 2,8,4 | + | W2 | waterway | river | Rhein | 3,9,5 | + | R1 | waterway | river | Rhein | 1,2,3,4,5,6 | And the relations | id | members | tags+type | - | 1 | W1:side_stream,W2:side_stream | waterway | + | 1 | W1:side_stream,W2:side_stream,W3 | waterway | When importing Then placex contains | object | linked_place_id | @@ -126,27 +143,35 @@ Feature: Linking of places # github #573 Scenario: Boundaries should only be linked to places + Given the 0.05 grid + | 1 | | 2 | + | | 9 | | + | 4 | | 3 | Given the named places - | osm | class | type | extra+wikidata | admin | geometry | - | R1 | boundary | administrative | 34 | 8 | poly-area:0.1 | + | osm | class | type | extra+wikidata | admin | geometry | + | R1 | boundary | administrative | 34 | 8 | (1,2,3,4,1) | And the named places - | osm | class | type | geometry | - | N3 | natural | island | 0.00001 0 | - | N3 | place | city | 0.00001 0 | + | osm | class | type | + | N9 | natural | island | + | N9 | place | city | And the relations | id | members | - | 1 | N3:label | + | 1 | N9:label | When importing Then placex contains | object | linked_place_id | - | N3:natural | - | - | N3:place | R1 | + | N9:natural | - | + | N9:place | R1 | Scenario: Nodes with 'role' label are always linked + Given the 0.05 grid + | 1 | | 2 | + | | 9 | | + | 4 | | 3 | Given the places - | osm | class | type | admin | name | geometry | - | R13 | boundary | administrative | 6 | Garbo | poly-area:0.1 | - | N2 | place | hamlet | 15 | Vario | 0.006 0.00001 | + | osm | class | type | admin | name | geometry | + | R13 | boundary | administrative | 6 | Garbo | (1,2,3,4,1) | + | N2 | place | hamlet | 15 | Vario | 9 | And the relations | id | members | tags+type | | 13 | N2:label | boundary | @@ -155,16 +180,20 @@ Feature: Linking of places | object | linked_place_id | | N2 | R13 | And placex contains - | object | centroid | name+name | extratags+linked_place | - | R13 | 0.006 0.00001 | Garbo | hamlet | + | object | centroid | name+name | extratags+linked_place | + | R13 | 9 | Garbo | hamlet | Scenario: Boundaries with place tags are linked against places with same type + Given the 0.01 grid + | 1 | | 2 | + | | 9 | | + | 4 | | 3 | Given the places - | osm | class | type | admin | name | extra+place | geometry | - | R13 | boundary | administrative | 4 | Berlin | city |poly-area:0.1 | + | osm | class | type | admin | name | extra+place | geometry | + | R13 | boundary | administrative | 4 | Berlin | city | (1,2,3,4,1) | And the places | osm | class | type | name | geometry | - | N2 | place | city | Berlin | 0.006 0.00001 | + | N2 | place | city | Berlin | 9 | When importing Then placex contains | object | linked_place_id | @@ -187,12 +216,16 @@ Feature: Linking of places Scenario: Boundaries without place tags only link against same admin level + Given the 0.05 grid + | 1 | | 2 | + | | 9 | | + | 4 | | 3 | Given the places | osm | class | type | admin | name | geometry | - | R13 | boundary | administrative | 4 | Berlin |poly-area:0.1 | + | R13 | boundary | administrative | 4 | Berlin | (1,2,3,4,1) | And the places | osm | class | type | name | geometry | - | N2 | place | city | Berlin | 0.006 0.00001 | + | N2 | place | city | Berlin | 9 | When importing Then placex contains | object | linked_place_id | @@ -215,12 +248,16 @@ Feature: Linking of places # github #1352 Scenario: Do not use linked centroid when it is outside the area + Given the 0.05 grid + | 1 | | 2 | | + | | | | 9 | + | 4 | | 3 | | Given the named places | osm | class | type | admin | geometry | - | R13 | boundary | administrative | 4 | poly-area:0.01 | + | R13 | boundary | administrative | 4 | (1,2,3,4,1) | And the named places | osm | class | type | geometry | - | N2 | place | city | 0.1 0.1 | + | N2 | place | city | 9 | And the relations | id | members | tags+type | | 13 | N2:label | boundary | @@ -233,13 +270,17 @@ Feature: Linking of places | R13 | in geometry | Scenario: Place nodes can only be linked once + Given the 0.02 grid + | 1 | | 2 | | 5 | + | | 9 | | | | + | 4 | | 3 | | 6 | Given the named places | osm | class | type | extra+wikidata | geometry | - | N2 | place | city | Q1234 | 0 0 | + | N2 | place | city | Q1234 | 9 | And the named places - | osm | class | type | extra+wikidata | admin | geometry | - | R1 | boundary | administrative | Q1234 | 8 | poly-area:0.1 | - | R2 | boundary | administrative | Q1234 | 9 | poly-area:0.01 | + | osm | class | type | extra+wikidata | admin | geometry | + | R1 | boundary | administrative | Q1234 | 8 | (1,2,5,6,3,4,1) | + | R2 | boundary | administrative | Q1234 | 9 | (1,2,3,4,1) | When importing Then placex contains | object | linked_place_id | diff --git a/test/bdd/db/import/parenting.feature b/test/bdd/db/import/parenting.feature index ba4cc28c..2500d2a9 100644 --- a/test/bdd/db/import/parenting.feature +++ b/test/bdd/db/import/parenting.feature @@ -3,16 +3,19 @@ Feature: Parenting of objects Tests that the correct parent is chosen Scenario: Address inherits postcode from its street unless it has a postcode - Given the scene roads-with-pois + Given the grid with origin DE + | 10 | | | | | 11 | + | | | | | | | + | | 1 | | 2 | | | And the places - | osm | class | type | housenr | geometry | - | N1 | place | house | 4 | :p-N1 | + | osm | class | type | housenr | + | N1 | place | house | 4 | And the places - | osm | class | type | housenr | postcode | geometry | - | N2 | place | house | 5 | 99999 | :p-N1 | + | osm | class | type | housenr | postcode | + | N2 | place | house | 5 | 99999 | And the places | osm | class | type | name | postcode | geometry | - | W1 | highway | residential | galoo | 12345 | :w-north | + | W1 | highway | residential | galoo | 12345 | 10,11 | When importing Then placex contains | object | parent_place_id | @@ -21,24 +24,28 @@ Feature: Parenting of objects When sending search query "4 galoo" Then results contain | ID | osm_type | osm_id | display_name | - | 0 | N | 1 | 4, galoo, 12345 | + | 0 | N | 1 | 4, galoo, 12345, Deutschland | When sending search query "5 galoo" Then results contain | ID | osm_type | osm_id | display_name | - | 0 | N | 2 | 5, galoo, 99999 | + | 0 | N | 2 | 5, galoo, 99999, Deutschland | Scenario: Address without tags, closest street - Given the scene roads-with-pois - And the places - | osm | class | type | geometry | - | N1 | place | house | :p-N1 | - | N2 | place | house | :p-N2 | - | N3 | place | house | :p-S1 | - | N4 | place | house | :p-S2 | + Given the grid + | 10 | | | | | 11 | + | | 1 | 2 | | | | + | | | | 3 | 4 | | + | 20 | | | | | 21 | + And the places + | osm | class | type | + | N1 | place | house | + | N2 | place | house | + | N3 | place | house | + | N4 | place | house | And the named places | osm | class | type | geometry | - | W1 | highway | residential | :w-north | - | W2 | highway | residential | :w-south | + | W1 | highway | residential | 10,11 | + | W2 | highway | residential | 20,21 | When importing Then placex contains | object | parent_place_id | @@ -48,17 +55,23 @@ Feature: Parenting of objects | N4 | W2 | Scenario: Address without tags avoids unnamed streets - Given the scene roads-with-pois - And the places - | osm | class | type | geometry | - | N1 | place | house | :p-N1 | - | N2 | place | house | :p-N2 | - | N3 | place | house | :p-S1 | - | N4 | place | house | :p-S2 | - | W1 | highway | residential | :w-north | + Given the grid + | 10 | | | | | 11 | + | | 1 | 2 | | | | + | | | | 3 | 4 | | + | 20 | | | | | 21 | + And the places + | osm | class | type | + | N1 | place | house | + | N2 | place | house | + | N3 | place | house | + | N4 | place | house | + And the places + | osm | class | type | geometry | + | W1 | highway | residential | 10,11 | And the named places | osm | class | type | geometry | - | W2 | highway | residential | :w-south | + | W2 | highway | residential | 20,21 | When importing Then placex contains | object | parent_place_id | @@ -68,17 +81,21 @@ Feature: Parenting of objects | N4 | W2 | Scenario: addr:street tag parents to appropriately named street - Given the scene roads-with-pois + Given the grid + | 10 | | | | | 11 | + | | 1 | 2 | | | | + | | | | 3 | 4 | | + | 20 | | | | | 21 | And the places - | osm | class | type | street| geometry | - | N1 | place | house | south | :p-N1 | - | N2 | place | house | north | :p-N2 | - | N3 | place | house | south | :p-S1 | - | N4 | place | house | north | :p-S2 | + | osm | class | type | street| + | N1 | place | house | south | + | N2 | place | house | north | + | N3 | place | house | south | + | N4 | place | house | north | And the places | osm | class | type | name | geometry | - | W1 | highway | residential | north | :w-north | - | W2 | highway | residential | south | :w-south | + | W1 | highway | residential | north | 10,11 | + | W2 | highway | residential | south | 20,21 | When importing Then placex contains | object | parent_place_id | @@ -89,20 +106,21 @@ Feature: Parenting of objects @fail-legacy Scenario: addr:street tag parents to appropriately named street, locale names - Given the scene roads-with-pois + Given the grid + | 10 | | | | | 11 | + | | 1 | 2 | | | | + | | | | 3 | 4 | | + | 20 | | | | | 21 | And the places - | osm | class | type | street| addr+street:de | geometry | - | N1 | place | house | south | Süd | :p-N1 | - | N2 | place | house | north | Nord | :p-N2 | - | N3 | place | house | south | Süd | :p-S1 | - | N4 | place | house | north | Nord | :p-S2 | + | osm | class | type | street| addr+street:de | + | N1 | place | house | south | Süd | + | N2 | place | house | north | Nord | + | N3 | place | house | south | Süd | + | N4 | place | house | north | Nord | And the places | osm | class | type | name | geometry | - | W1 | highway | residential | Nord | :w-north | - | W2 | highway | residential | Süd | :w-south | - And the places - | osm | class | type | name | name+name:old | - | N5 | place | hamlet | south | north | + | W1 | highway | residential | Nord | 10,11 | + | W2 | highway | residential | Süd | 20,21 | When importing Then placex contains | object | parent_place_id | @@ -112,17 +130,21 @@ Feature: Parenting of objects | N4 | W1 | Scenario: addr:street tag parents to appropriately named street with abbreviation - Given the scene roads-with-pois - And the places - | osm | class | type | street| geometry | - | N1 | place | house | south st | :p-N1 | - | N2 | place | house | north st | :p-N2 | - | N3 | place | house | south st | :p-S1 | - | N4 | place | house | north st | :p-S2 | - And the places - | osm | class | type | name+name:en | geometry | - | W1 | highway | residential | north street | :w-north | - | W2 | highway | residential | south street | :w-south | + Given the grid + | 10 | | | | | 11 | + | | 1 | 2 | | | | + | | | | 3 | 4 | | + | 20 | | | | | 21 | + And the places + | osm | class | type | street | + | N1 | place | house | south st | + | N2 | place | house | north st | + | N3 | place | house | south st | + | N4 | place | house | north st | + And the places + | osm | class | type | name+name:en | geometry | + | W1 | highway | residential | north street | 10,11 | + | W2 | highway | residential | south street | 20,21 | When importing Then placex contains | object | parent_place_id | @@ -131,20 +153,22 @@ Feature: Parenting of objects | N3 | W2 | | N4 | W1 | - - Scenario: addr:street tag parents to next named street - Given the scene roads-with-pois + Given the grid + | 10 | | | | | 11 | + | | 1 | 2 | | | | + | | | | 3 | 4 | | + | 20 | | | | | 21 | And the places - | osm | class | type | street | geometry | - | N1 | place | house | abcdef | :p-N1 | - | N2 | place | house | abcdef | :p-N2 | - | N3 | place | house | abcdef | :p-S1 | - | N4 | place | house | abcdef | :p-S2 | + | osm | class | type | street | + | N1 | place | house | abcdef | + | N2 | place | house | abcdef | + | N3 | place | house | abcdef | + | N4 | place | house | abcdef | And the places | osm | class | type | name | geometry | - | W1 | highway | residential | abcdef | :w-north | - | W2 | highway | residential | abcdef | :w-south | + | W1 | highway | residential | abcdef | 10,11 | + | W2 | highway | residential | abcdef | 20,21 | When importing Then placex contains | object | parent_place_id | @@ -154,64 +178,74 @@ Feature: Parenting of objects | N4 | W2 | Scenario: addr:street tag without appropriately named street - Given the scene roads-with-pois + Given the grid + | 10 | | | | | 11 | + | | 1 | | | | | + | | | | 3 | | | + | 20 | | | | | 21 | And the places - | osm | class | type | street | geometry | - | N1 | place | house | abcdef | :p-N1 | - | N2 | place | house | abcdef | :p-N2 | - | N3 | place | house | abcdef | :p-S1 | - | N4 | place | house | abcdef | :p-S2 | + | osm | class | type | street | + | N1 | place | house | abcdef | + | N3 | place | house | abcdef | And the places | osm | class | type | name | geometry | - | W1 | highway | residential | abcde | :w-north | - | W2 | highway | residential | abcde | :w-south | + | W1 | highway | residential | abcde | 10,11 | + | W2 | highway | residential | abcde | 20,21 | When importing Then placex contains | object | parent_place_id | | N1 | W1 | - | N2 | W1 | | N3 | W2 | - | N4 | W2 | Scenario: addr:place address - Given the scene road-with-alley + Given the grid + | 10 | | | | + | | 1 | | 2 | + | 11 | | | | And the places - | osm | class | type | addr_place | geometry | - | N1 | place | house | myhamlet | :n-alley | + | osm | class | type | addr_place | + | N1 | place | house | myhamlet | And the places | osm | class | type | name | geometry | - | N2 | place | hamlet | myhamlet | :n-main-west | - | W1 | highway | residential | myhamlet | :w-main | + | N2 | place | hamlet | myhamlet | 2 | + | W1 | highway | residential | myhamlet | 10,11 | When importing Then placex contains | object | parent_place_id | | N1 | N2 | Scenario: addr:street is preferred over addr:place - Given the scene road-with-alley + Given the grid + | 10 | | | | + | | | 1 | 2 | + | 11 | | | | And the places - | osm | class | type | addr_place | street | geometry | - | N1 | place | house | myhamlet | mystreet| :n-alley | + | osm | class | type | addr_place | street | + | N1 | place | house | myhamlet | mystreet| And the places | osm | class | type | name | geometry | - | N2 | place | hamlet | myhamlet | :n-main-west | - | W1 | highway | residential | mystreet | :w-main | + | N2 | place | hamlet | myhamlet | 2 | + | W1 | highway | residential | mystreet | 10,11 | When importing Then placex contains | object | parent_place_id | | N1 | W1 | Scenario: Untagged address in simple associated street relation - Given the scene road-with-alley + Given the grid + | 10 | | | | | 11 | + | | 2 | | 3 | | | + | | | | | | | + | 12 | 1 | | | | | And the places - | osm | class | type | geometry | - | N1 | place | house | :n-alley | - | N2 | place | house | :n-corner | - | N3 | place | house | :n-main-west | + | osm | class | type | + | N1 | place | house | + | N2 | place | house | + | N3 | place | house | And the places | osm | class | type | name | geometry | - | W1 | highway | residential | foo | :w-main | - | W2 | highway | service | bar | :w-alley | + | W1 | highway | residential | foo | 10,11 | + | W2 | highway | service | bar | 10,12 | And the relations | id | members | tags+type | | 1 | W1:street,N1,N2,N3 | associatedStreet | @@ -223,16 +257,22 @@ Feature: Parenting of objects | N3 | W1 | Scenario: Avoid unnamed streets in simple associated street relation - Given the scene road-with-alley + Given the grid + | 10 | | | | | 11 | + | | 2 | | 3 | | | + | | | | | | | + | 12 | 1 | | | | | And the places - | osm | class | type | geometry | - | N1 | place | house | :n-alley | - | N2 | place | house | :n-corner | - | N3 | place | house | :n-main-west | - | W2 | highway | residential | :w-alley | + | osm | class | type | + | N1 | place | house | + | N2 | place | house | + | N3 | place | house | + And the places + | osm | class | type | geometry | + | W2 | highway | residential | 10,12 | And the named places | osm | class | type | geometry | - | W1 | highway | residential | :w-main | + | W1 | highway | residential | 10,11 | And the relations | id | members | tags+type | | 1 | N1,N2,N3,W2:street,W1:street | associatedStreet | @@ -244,89 +284,107 @@ Feature: Parenting of objects | N3 | W1 | Scenario: Associated street relation overrides addr:street - Given the scene road-with-alley + Given the grid + | 10 | | | | 11 | + | | | | | | + | | | 1 | | | + | | 20 | | 21 | | And the places - | osm | class | type | street | geometry | - | N1 | place | house | bar | :n-alley | + | osm | class | type | street | + | N1 | place | house | bar | And the places | osm | class | type | name | geometry | - | W1 | highway | residential | foo | :w-main | - | W2 | highway | residential | bar | :w-alley | + | W1 | highway | residential | foo | 10,11 | + | W2 | highway | residential | bar | 20,21 | And the relations - | id | members | tags+type | - | 1 | W1:street,N1,N2,N3 | associatedStreet | + | id | members | tags+type | + | 1 | W1:street,N1 | associatedStreet | When importing Then placex contains | object | parent_place_id | | N1 | W1 | Scenario: Building without tags, closest street from center point - Given the scene building-on-street-corner + Given the grid + | 10 | | | | 11 | + | | | 1 | 2 | | + | 12 | | 4 | 3 | | And the named places - | osm | class | type | geometry | - | W1 | building | yes | :w-building | - | W2 | highway | primary | :w-WE | - | W3 | highway | residential | :w-NS | + | osm | class | type | geometry | + | W1 | building | yes | (1,2,3,4,1) | + | W2 | highway | primary | 10,11 | + | W3 | highway | residential | 10,12 | When importing Then placex contains | object | parent_place_id | | W1 | W2 | Scenario: Building with addr:street tags - Given the scene building-on-street-corner + Given the grid + | 10 | | | | 11 | + | | | 1 | 2 | | + | 12 | | 4 | 3 | | And the named places | osm | class | type | street | geometry | - | W1 | building | yes | bar | :w-building | + | W1 | building | yes | foo | (1,2,3,4,1) | 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 | - | W1 | W2 | + | W1 | W3 | Scenario: Building with addr:place tags - Given the scene building-on-street-corner + Given the grid + | 10 | | | | | + | | 1 | 2 | | 9 | + | 11 | 4 | 3 | | | And the places | osm | class | type | name | geometry | - | N1 | place | village | bar | :n-outer | - | W2 | highway | primary | bar | :w-WE | - | W3 | highway | residential | foo | :w-NS | + | N9 | place | village | bar | 9 | + | W2 | highway | primary | bar | 10,11 | And the named places - | osm | class | type | addr_place | geometry | - | W1 | building | yes | bar | :w-building | + | osm | class | type | addr_place | geometry | + | W1 | building | yes | bar | (1,2,3,4,1) | When importing Then placex contains | object | parent_place_id | - | W1 | N1 | + | W1 | N9 | Scenario: Building in associated street relation - Given the scene building-on-street-corner + Given the grid + | 10 | | | | 11 | + | | | 1 | 2 | | + | 12 | | 4 | 3 | | And the named places - | osm | class | type | geometry | - | W1 | building | yes | :w-building | + | osm | class | type | geometry | + | W1 | building | yes | (1,2,3,4,1) | 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 | And the relations | id | members | tags+type | - | 1 | W1:house,W2:street | associatedStreet | + | 1 | W1:house,W3:street | associatedStreet | When importing Then placex contains | object | parent_place_id | - | W1 | W2 | + | W1 | W3 | Scenario: Building in associated street relation overrides addr:street - Given the scene building-on-street-corner + Given the grid + | 10 | | | | 11 | + | | | 1 | 2 | | + | 12 | | 4 | 3 | | And the named places - | osm | class | type | street | geometry | - | W1 | building | yes | foo | :w-building | + | osm | class | type | street | geometry | + | W1 | building | yes | foo | (1,2,3,4,1) | 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 | And the relations | id | members | tags+type | | 1 | W1:house,W2:street | associatedStreet | @@ -336,17 +394,19 @@ Feature: Parenting of objects | W1 | W2 | Scenario: Wrong member in associated street relation is ignored - Given the scene building-on-street-corner - And the named places + Given the grid + | 10 | | | | | | | 11 | + | | 1 | | 3 | 4 | | | | + | | | | 6 | 5 | | | | + And the named places | osm | class | type | geometry | - | N1 | place | house | :n-outer | + | N1 | place | house | 11 | And the named places - | osm | class | type | street | geometry | - | W1 | building | yes | foo | :w-building | + | osm | class | type | street | geometry | + | W1 | building | yes | foo | (3,4,5,6,3) | And the places | osm | class | type | name | geometry | - | W2 | highway | primary | bar | :w-WE | - | W3 | highway | residential | foo | :w-NS | + | W3 | highway | residential | foo | 10,11 | And the relations | id | members | tags+type | | 1 | N1:house,W1:street,W3:street | associatedStreet | @@ -355,7 +415,6 @@ Feature: Parenting of objects | object | parent_place_id | | N1 | W3 | - Scenario: street member in associatedStreet relation can be a relation Given the grid | 1 | | | 2 | @@ -379,19 +438,23 @@ Feature: Parenting of objects | N9 | R14 | Scenario: POIs in building inherit address - Given the scene building-on-street-corner + Given the grid + | 10 | | | | | | 11 | + | | | 5 | 2 | 6 | | | + | | | 3 | 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 | + | N2 | shop | bakery | + | N3 | shop | supermarket| And the places - | osm | class | type | street | addr_place | housenr | geometry | - | W1 | building | yes | foo | nowhere | 3 | :w-building | + | osm | class | type | street | housenr | geometry | + | W1 | building | yes | foo | 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 | @@ -405,114 +468,126 @@ Feature: Parenting of objects | 3 | Scenario: POIs don't inherit from streets - Given the scene building-on-street-corner + Given the grid + | 10 | | | | 11 | + | | 5 | 1 | 6 | | + | | 8 | | 7 | | And the named places - | osm | class | type | geometry | - | N1 | amenity | bank | :n-inner | + | osm | class | type | + | N1 | amenity | bank | And the places - | osm | class | type | street | addr_place | housenr | geometry | - | W1 | highway | path | foo | nowhere | 3 | :w-building | + | osm | class | type | name | street | housenr | geometry | + | W1 | highway | path | bar | foo | 3 | (5,6,7,8,5) | And the places | osm | class | type | name | geometry | - | W3 | highway | residential | foo | :w-NS | + | W3 | highway | residential | foo | 10,11 | When importing Then placex contains | object | parent_place_id | housenumber | - | N1 | W3 | None | + | N1 | W1 | None | Scenario: POIs with own address do not inherit building address - Given the scene building-on-street-corner + Given the grid + | 10 | | | | | | 11 | + | | | 6 | 2 | 7 | | | + | | | 3 | 1 | | 5 | 4 | + | 12 | | 9 | | 8 | | | And the named places - | osm | class | type | street | geometry | - | N1 | amenity | bank | bar | :n-inner | + | osm | class | type | street | + | N1 | amenity | bank | bar | And the named places - | osm | class | type | housenr | geometry | - | N2 | shop | bakery | 4 | :n-edge-NS | + | osm | class | type | housenr | + | N2 | shop | bakery | 4 | And the named places - | osm | class | type | addr_place | geometry | - | N3 | shop | supermarket| nowhere | :n-edge-WE | + | osm | class | type | addr_place | + | N3 | shop | supermarket| nowhere | And the places - | osm | class | type | name | geometry | - | N4 | place | isolated_dwelling | theplace | :n-outer | + | osm | class | type | name | + | N4 | place | isolated_dwelling | theplace | + | N5 | place | isolated_dwelling | nowhere | And the places - | osm | class | type | addr_place | housenr | geometry | - | W1 | building | yes | theplace | 3 | :w-building | + | osm | class | type | addr_place | housenr | geometry | + | W1 | building | yes | theplace | 3 | (6,7,8,9,6) | 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 | N4 | 3 | | N1 | W2 | None | - | N2 | W3 | 4 | - | N3 | N4 | None | + | N2 | W2 | 4 | + | N3 | N5 | None | Scenario: POIs parent a road if they are attached to it - Given the scene points-on-roads + Given the grid + | | 10 | | + | 20 | 1 | 21 | + | | 11 | | And the named places - | osm | class | type | street | geometry | - | N1 | highway | bus_stop | North St | :n-SE | - | N2 | highway | bus_stop | South St | :n-NW | - | N3 | highway | bus_stop | North St | :n-S-unglued | - | N4 | highway | bus_stop | South St | :n-N-unglued | + | osm | class | type | + | N1 | highway | bus_stop | And the places | osm | class | type | name | geometry | - | W1 | highway | secondary | North St | :w-north | - | W2 | highway | unclassified | South St | :w-south | + | W1 | highway | secondary | North St | 10,11 | + | W2 | highway | unclassified | South St | 20,1,21 | And the ways | id | nodes | - | 1 | 100,101,2,103,104 | - | 2 | 200,201,1,202,203 | + | 1 | 10,11 | + | 2 | 20,1,21 | When importing Then placex contains | object | parent_place_id | - | N1 | W1 | - | N2 | W2 | - | N3 | W1 | - | N4 | W2 | + | N1 | W2 | Scenario: POIs do not parent non-roads they are attached to - Given the scene points-on-roads + Given the grid + | 10 | | 1 | | 11 | | 30 | + | 14 | | | | 15 | | | + | 13 | | 2 | | 12 | | 31 | And the named places - | osm | class | type | street | geometry | - | N1 | highway | bus_stop | North St | :n-SE | - | N2 | highway | bus_stop | South St | :n-NW | + | osm | class | type | street | + | N1 | highway | bus_stop | North St | + | N2 | highway | bus_stop | South St | And the places | osm | class | type | name | geometry | - | W1 | landuse | residential | North St | :w-north | - | W2 | waterway| river | South St | :w-south | + | W1 | landuse | residential | North St | (14,15,12,2,13,14) | + | W2 | waterway| river | South St | 10,1,11 | + | W3 | highway | residential | foo | 30,31 | And the ways | id | nodes | - | 1 | 100,101,2,103,104 | - | 2 | 200,201,1,202,203 | + | 1 | 10,11,12,2,13,10 | + | 2 | 10,1,11 | When importing Then placex contains | object | parent_place_id | - | N1 | 0 | - | N2 | 0 | + | N1 | W3 | + | N2 | W3 | Scenario: POIs on building outlines inherit associated street relation - Given the scene building-on-street-corner + Given the grid + | 10 | | | | 11 | + | | 5 | 1 | 6 | | + | 12 | 8 | | 7 | | And the named places - | osm | class | type | geometry | - | N1 | place | house | :n-edge-NS | - | W1 | building | yes | :w-building | + | osm | class | type | geometry | + | N1 | place | house | 1 | + | W1 | building | yes | (5,1,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 | And the relations | id | members | tags+type | - | 1 | W1:house,W2:street | associatedStreet | + | 1 | W1:house,W3:street | associatedStreet | And the ways | id | nodes | - | 1 | 100,1,101,102,100 | + | 1 | 5,1,6,7,8,5 | When importing Then placex contains | object | parent_place_id | - | N1 | W2 | + | N1 | W3 | # github #1056 Scenario: Full names should be preferably matched for nearest road diff --git a/test/bdd/db/import/placex.feature b/test/bdd/db/import/placex.feature index e62a5e5b..e0e8925f 100644 --- a/test/bdd/db/import/placex.feature +++ b/test/bdd/db/import/placex.feature @@ -55,9 +55,12 @@ Feature: Import into placex Then placex has no entry for N1 Scenario: postcode boundary without postcode is dropped + Given the 0.01 grid + | 1 | 2 | + | 3 | | Given the places - | osm | class | type | name+ref | geometry | - | R1 | boundary | postal_code | 554476 | poly-area:0.1 | + | osm | class | type | name+ref | geometry | + | R1 | boundary | postal_code | 554476 | (1,2,3,1) | When importing Then placex has no entry for R1 @@ -91,18 +94,19 @@ Feature: Import into placex | R41 | 8 | 0 | Scenario: search and address ranks for highways correctly assigned - Given the scene roads-with-pois + Given the grid + | 10 | 1 | 11 | | 12 | | 13 | | 14 | | 15 | | 16 | And the places | osm | class | type | | N1 | highway | bus_stop | And the places | osm | class | type | geometry | - | W1 | highway | primary | :w-south | - | W2 | highway | secondary | :w-south | - | W3 | highway | tertiary | :w-south | - | W4 | highway | residential | :w-north | - | W5 | highway | unclassified | :w-north | - | W6 | highway | something | :w-north | + | W1 | highway | primary | 10,11 | + | W2 | highway | secondary | 11,12 | + | W3 | highway | tertiary | 12,13 | + | W4 | highway | residential | 13,14 | + | W5 | highway | unclassified | 14,15 | + | W6 | highway | something | 15,16 | When importing Then placex contains | object | rank_search | rank_address | @@ -115,15 +119,18 @@ Feature: Import into placex | W6 | 30 | 30 | Scenario: rank and inclusion of landuses + Given the 0.4 grid + | 1 | 2 | | | | | | 5 | + | 4 | 3 | | | | | | 6 | Given the named places | osm | class | type | | N2 | landuse | residential | And the named places - | osm | class | type | geometry | - | W2 | landuse | residential | 1 1, 1 1.1 | - | W4 | landuse | residential | poly-area:0.1 | - | R2 | landuse | residential | poly-area:0.05 | - | R3 | landuse | forrest | poly-area:0.5 | + | osm | class | type | geometry | + | W2 | landuse | residential | 1,2,5 | + | W4 | landuse | residential | (1,4,3,1) | + | R2 | landuse | residential | (1,2,3,4,1) | + | R3 | landuse | forrest | (1,5,6,4,1) | When importing Then placex contains | object | rank_search | rank_address | @@ -134,19 +141,22 @@ Feature: Import into placex | R3 | 22 | 0 | Scenario: rank and inclusion of naturals + Given the 0.4 grid + | 1 | 2 | | | | | | 5 | + | 4 | 3 | | | | | | 6 | Given the named places | osm | class | type | | N2 | natural | peak | | N4 | natural | volcano | | N5 | natural | foobar | And the named places - | osm | class | type | geometry | - | W2 | natural | mountain_range | 12 12,11 11 | - | W3 | natural | foobar | 13 13,13.1 13 | - | R3 | natural | volcano | poly-area:0.1 | - | R4 | natural | foobar | poly-area:0.5 | - | R5 | natural | sea | poly-area:5.0 | - | R6 | natural | sea | poly-area:0.01 | + | osm | class | type | geometry | + | W2 | natural | mountain_range | 1,2,5 | + | W3 | natural | foobar | 2,3 | + | R3 | natural | volcano | (1,2,4,1) | + | R4 | natural | foobar | (1,2,3,4,1) | + | R5 | natural | sea | (1,2,5,6,3,4,1) | + | R6 | natural | sea | (2,3,4,2) | When importing Then placex contains | object | rank_search | rank_address | @@ -161,16 +171,19 @@ Feature: Import into placex | W3 | 22 | 0 | Scenario: boundary ways for countries and states are ignored + Given the 0.3 grid + | 1 | 2 | + | 4 | 3 | Given the named places | osm | class | type | admin | geometry | - | W4 | boundary | administrative | 2 | poly-area:0.1 | - | R4 | boundary | administrative | 2 | poly-area:0.1 | - | W5 | boundary | administrative | 3 | poly-area:0.1 | - | R5 | boundary | administrative | 3 | poly-area:0.1 | - | W6 | boundary | administrative | 4 | poly-area:0.1 | - | R6 | boundary | administrative | 4 | poly-area:0.1 | - | W7 | boundary | administrative | 5 | poly-area:0.1 | - | R7 | boundary | administrative | 5 | poly-area:0.1 | + | W4 | boundary | administrative | 2 | (1,2,3,4,1) | + | R4 | boundary | administrative | 2 | (1,2,3,4,1) | + | W5 | boundary | administrative | 3 | (1,2,3,4,1) | + | R5 | boundary | administrative | 3 | (1,2,3,4,1) | + | W6 | boundary | administrative | 4 | (1,2,3,4,1) | + | R6 | boundary | administrative | 4 | (1,2,3,4,1) | + | W7 | boundary | administrative | 5 | (1,2,3,4,1) | + | R7 | boundary | administrative | 5 | (1,2,3,4,1) | When importing Then placex contains exactly | object | diff --git a/test/bdd/db/import/postcodes.feature b/test/bdd/db/import/postcodes.feature index 37c30ef8..15beab57 100644 --- a/test/bdd/db/import/postcodes.feature +++ b/test/bdd/db/import/postcodes.feature @@ -3,128 +3,155 @@ Feature: Import of postcodes Tests for postcode estimation Scenario: Postcodes on the object are preferred over those on the address - Given the scene admin-areas + Given the grid with origin FR + | 1 | | | | 4 | | 6 | | 8 | + | | 10 | | 11 | | | | | | + | | | 22 | | | | | | | + | 2 | | | | 3 | | 5 | | 7 | And the named places - | osm | class | type | admin | addr+postcode | geometry | - | R1 | boundary | administrative | 6 | 112 | :b0 | - | R34 | boundary | administrative | 8 | 112 DE | :b1:E | - | R4 | boundary | administrative | 10 | 112 DE 34 | :b2:N | + | osm | class | type | admin | addr+postcode | geometry | + | R1 | boundary | administrative | 6 | 10000 | (1,8,7,2,1) | + | R34 | boundary | administrative | 8 | 11000 | (1,6,5,2,1) | + | R4 | boundary | administrative | 10 | 11200 | (1,4,3,2,1) | And the named places | osm | class | type | addr+postcode | geometry | - | W93 | highway | residential | 112 DE 344 | :w2N | - | W22 | building | yes | 112 DE 344N | :building:w2N | + | W93 | highway | residential | 11250 | 10,11 | + | N22 | building | yes | 11254 | 22 | When importing Then placex contains - | object | postcode | - | W22 | 112 DE 344N | - | W93 | 112 DE 344 | - | R4 | 112 DE 34 | - | R34 | 112 DE | - | R1 | 112 | + | object | postcode | + | N22 | 11254 | + | W93 | 11250 | + | R4 | 11200 | + | R34 | 11000 | + | R1 | 10000 | Scenario: Postcodes from a road are inherited by an attached building - Given the scene admin-areas + Given the grid with origin DE + | 10 | | | | 11 | + | | 1 | 2 | | | + | | 4 | 3 | | | And the named places | osm | class | type | addr+postcode | geometry | - | W93 | highway | residential | 86034 | :w2N | + | W93 | highway | residential | 86034 | 10,11 | And the named places - | osm | class | type | geometry | - | W22 | building | yes | :building:w2N | + | osm | class | type | geometry | + | W22 | building | yes | (1,2,3,4,1) | When importing Then placex contains | object | postcode | parent_place_id | | W22 | 86034 | W93 | Scenario: Postcodes from the lowest admin area are inherited by ways - Given the scene admin-areas + Given the grid with origin FR + | 1 | | | | 4 | | 6 | | 8 | + | | 10 | | 11 | | | | | | + | 2 | | | | 3 | | 5 | | 7 | And the named places | osm | class | type | admin | addr+postcode | geometry | - | R1 | boundary | administrative | 6 | 112 | :b0 | - | R34 | boundary | administrative | 8 | 112 DE | :b1:E | - | R4 | boundary | administrative | 10 | 112 DE 34 | :b2:N | + | R1 | boundary | administrative | 6 | 10000 | (1,8,7,2,1) | + | R34 | boundary | administrative | 8 | 11000 | (1,6,5,2,1) | + | R4 | boundary | administrative | 10 | 11200 | (1,4,3,2,1) | And the named places | osm | class | type | geometry | - | W93 | highway | residential | :w2N | + | W93 | highway | residential | 10,11 | When importing Then placex contains - | object | postcode | - | W93 | 112 DE 34 | + | object | postcode | + | W93 | 11200 | Scenario: Postcodes from the lowest admin area with postcode are inherited by ways - Given the scene admin-areas + Given the grid with origin FR + | 1 | | | | 4 | | 6 | | 8 | + | | 10 | | 11 | | | | | | + | 2 | | | | 3 | | 5 | | 7 | And the named places | osm | class | type | admin | addr+postcode | geometry | - | R1 | boundary | administrative | 6 | 112 | :b0 | - | R34 | boundary | administrative | 8 | 112 DE | :b1:E | + | R1 | boundary | administrative | 6 | 10000 | (1,8,7,2,1) | + | R34 | boundary | administrative | 8 | 11000 | (1,6,5,2,1) | And the named places - | osm | class | type | admin | geometry | - | R4 | boundary | administrative | 10 | :b2:N | + | osm | class | type | admin | geometry | + | R4 | boundary | administrative | 10 | (1,4,3,2,1) | And the named places | osm | class | type | geometry | - | W93 | highway | residential | :w2N | + | W93 | highway | residential | 10,11 | When importing Then placex contains | object | postcode | parent_place_id | - | W93 | 112 DE | R4 | + | W93 | 11000 | R4 | Scenario: Postcodes from the lowest admin area are inherited by buildings - Given the scene admin-areas + Given the grid with origin FR + | 1 | | | | 4 | | 6 | | 8 | + | | 10 | | 11 | | | | | | + | | 13 | | 12 | | | | | | + | 2 | | | | 3 | | 5 | | 7 | And the named places | osm | class | type | admin | addr+postcode | geometry | - | R1 | boundary | administrative | 6 | 112 | :b0 | - | R34 | boundary | administrative | 8 | 112 DE | :b1:E | - | R4 | boundary | administrative | 10 | 112 DE 34 | :b2:N | + | R1 | boundary | administrative | 6 | 10000 | (1,8,7,2,1) | + | R34 | boundary | administrative | 8 | 11000 | (1,6,5,2,1) | + | R4 | boundary | administrative | 10 | 11200 | (1,4,3,2,1) | And the named places | osm | class | type | geometry | - | W22 | building | yes | :building:w2N | + | W22 | building | yes | (10,11,12,13,10) | When importing Then placex contains - | object | postcode | - | W22 | 112 DE 34 | + | object | postcode | + | W22 | 11200 | Scenario: Roads get postcodes from nearby named buildings without other info - Given the scene admin-areas + Given the grid with origin US + | 10 | | | | 11 | + | | 1 | 2 | | | + | | 4 | 3 | | | And the named places | osm | class | type | geometry | - | W93 | highway | residential | :w2N | + | W93 | highway | residential | 10,11 | And the named places - | osm | class | type | addr+postcode | geometry | - | W22 | building | yes | 445023 | :building:w2N | + | osm | class | type | addr+postcode | geometry | + | W22 | building | yes | 45023 | (1,2,3,4,1) | When importing Then placex contains | object | postcode | - | W93 | 445023 | + | W93 | 45023 | Scenario: Roads get postcodes from nearby unnamed buildings without other info - Given the scene admin-areas + Given the grid with origin US + | 10 | | | | 11 | + | | 1 | 2 | | | + | | 4 | 3 | | | And the named places | osm | class | type | geometry | - | W93 | highway | residential | :w2N | - And the named places - | osm | class | type | addr+postcode | geometry | - | W22 | place | postcode | 445023 | :building:w2N | + | W93 | highway | residential | 10,11 | + And the places + | osm | class | type | addr+postcode | geometry | + | W22 | place | postcode | 45023 | (1,2,3,4,1) | When importing Then placex contains | object | postcode | - | W93 | 445023 | + | W93 | 45023 | Scenario: Postcodes from admin boundaries are preferred over estimated postcodes - Given the scene admin-areas + Given the grid with origin FR + | 1 | | | | 4 | | 6 | | 8 | + | | 10 | | 11 | | | | | | + | | | 22 | | | | | | | + | 2 | | | | 3 | | 5 | | 7 | And the named places | osm | class | type | admin | addr+postcode | geometry | - | R1 | boundary | administrative | 6 | 112 | :b0 | - | R34 | boundary | administrative | 8 | 112 DE | :b1:E | - | R4 | boundary | administrative | 10 | 112 DE 34 | :b2:N | + | R1 | boundary | administrative | 6 | 10000 | (1,8,7,2,1) | + | R34 | boundary | administrative | 8 | 11000 | (1,6,5,2,1) | + | R4 | boundary | administrative | 10 | 11200 | (1,4,3,2,1) | And the named places | osm | class | type | geometry | - | W93 | highway | residential | :w2N | + | W93 | highway | residential | 10,1 | And the named places - | osm | class | type | addr+postcode | geometry | - | W22 | building | yes | 445023 | :building:w2N | + | osm | class | type | addr+postcode | + | N22 | building | yes | 45023 | When importing Then placex contains - | object | postcode | - | W93 | 112 DE 34 | + | object | postcode | + | W93 | 11200 | Scenario: Postcodes are added to the postcode and word table Given the places diff --git a/test/bdd/db/import/search_name.feature b/test/bdd/db/import/search_name.feature index a5b07e5c..7c75ca49 100644 --- a/test/bdd/db/import/search_name.feature +++ b/test/bdd/db/import/search_name.feature @@ -26,24 +26,28 @@ Feature: Creation of search terms | N1 | #Halle Saale, #Halle | Scenario: Unnamed POIs have no search entry - Given the scene roads-with-pois + Given the grid + | | 1 | | | + | 10 | | | 11 | And the places - | osm | class | type | geometry | - | N1 | place | house | :p-N1 | + | osm | class | type | + | N1 | place | house | And the named places | osm | class | type | geometry | - | W1 | highway | residential | :w-north | + | W1 | highway | residential | 10,11 | When importing Then search_name has no entry for N1 Scenario: Unnamed POI has a search entry when it has unknown addr: tags - Given the scene roads-with-pois + Given the grid + | | 1 | | | + | 10 | | | 11 | And the places - | osm | class | type | housenr | addr+city | geometry | - | N1 | place | house | 23 | Walltown | :p-N1 | + | osm | class | type | housenr | addr+city | + | N1 | place | house | 23 | Walltown | And the places | osm | class | type | name+name | geometry | - | W1 | highway | residential | Rose Street | :w-north | + | W1 | highway | residential | Rose Street | 10,11 | When importing Then search_name contains | object | nameaddress_vector | @@ -62,13 +66,15 @@ Feature: Creation of search terms | N1 | 23, Rose Street | Scenario: Searching for unknown addr: tags also works for multiple words - Given the scene roads-with-pois + Given the grid + | | 1 | | | + | 10 | | | 11 | And the places - | osm | class | type | housenr | addr+city | geometry | - | N1 | place | house | 23 | Little Big Town | :p-N1 | + | osm | class | type | housenr | addr+city | + | N1 | place | house | 23 | Little Big Town | And the places | osm | class | type | name+name | geometry | - | W1 | highway | residential | Rose Street | :w-north | + | W1 | highway | residential | Rose Street | 10,11 | When importing Then search_name contains | object | nameaddress_vector | @@ -87,13 +93,15 @@ Feature: Creation of search terms | N1 | 23, Rose Street | Scenario: Unnamed POI has no search entry when it has known addr: tags - Given the scene roads-with-pois + Given the grid + | | 1 | | | + | 10 | | | 11 | And the places - | osm | class | type | housenr | addr+city | geometry | - | N1 | place | house | 23 | Walltown | :p-N1 | + | osm | class | type | housenr | addr+city | + | N1 | place | house | 23 | Walltown | And the places | osm | class | type | name+name | addr+city | geometry | - | W1 | highway | residential | Rose Street | Walltown | :w-north | + | W1 | highway | residential | Rose Street | Walltown | 10,11 | When importing Then search_name has no entry for N1 When sending search query "23 Rose Street, Walltown" @@ -102,29 +110,34 @@ Feature: Creation of search terms | N1 | 23, Rose Street | Scenario: Unnamed POI must have a house number to get a search entry - Given the scene roads-with-pois + Given the grid + | | 1 | | | + | 10 | | | 11 | And the places - | osm | class | type | addr+city | geometry | - | N1 | place | house | Walltown | :p-N1 | + | osm | class | type | addr+city | + | N1 | place | house | Walltown | And the places | osm | class | type | name+name | geometry | - | W1 | highway | residential | Rose Street | :w-north | + | W1 | highway | residential | Rose Street | 10,11 | When importing Then search_name has no entry for N1 Scenario: Unnamed POIs inherit parent name when unknown addr:place is present - Given the scene roads-with-pois + Given the grid + | 100 | | | | | 101 | + | | | 1 | | | | + | 103 | 10 | | | 11 | 102 | And the places - | osm | class | type | housenr | addr+place | geometry | - | N1 | place | house | 23 | Walltown | :p-N1 | + | osm | class | type | housenr | addr+place | + | N1 | place | house | 23 | Walltown | And the places | osm | class | type | name+name | geometry | - | W1 | highway | residential | Rose Street | :w-north | - | N2 | place | city | Strange Town | :p-N1 | + | W1 | highway | residential | Rose Street | 10,11 | + | R1 | place | city | Strange Town | (100,101,102,103,100) | When importing Then placex contains | object | parent_place_id | - | N1 | N2 | + | N1 | R1 | When sending search query "23 Rose Street" Then exactly 1 results are returned And results contain @@ -144,14 +157,17 @@ Feature: Creation of search terms | N1 | 23, Walltown, Strange Town | Scenario: Named POIs can be searched by housenumber when unknown addr:place is present - Given the scene roads-with-pois + Given the grid + | 100 | | | | | 101 | + | | | 1 | | | | + | 103 | 10 | | | 11 | 102 | And the places - | osm | class | type | name | housenr | addr+place | geometry | - | N1 | place | house | Blue house | 23 | Walltown | :p-N1 | + | osm | class | type | name | housenr | addr+place | + | N1 | place | house | Blue house | 23 | Walltown | And the places | osm | class | type | name+name | geometry | - | W1 | highway | residential | Rose Street | :w-north | - | N2 | place | city | Strange Town | :p-N1 | + | W1 | highway | residential | Rose Street | 10,11 | + | R1 | place | city | Strange Town | (100,101,102,103,100) | When importing When sending search query "23 Walltown, Strange Town" Then results contain @@ -175,14 +191,17 @@ Feature: Creation of search terms | N1 | Blue house, 23, Walltown, Strange Town | Scenario: Named POIs can be found when unknown multi-word addr:place is present - Given the scene roads-with-pois + Given the grid + | 100 | | | | | 101 | + | | | 1 | | | | + | 103 | 10 | | | 11 | 102 | And the places - | osm | class | type | name | housenr | addr+place | geometry | - | N1 | place | house | Blue house | 23 | Moon sun | :p-N1 | + | osm | class | type | name | housenr | addr+place | + | N1 | place | house | Blue house | 23 | Moon sun | And the places | osm | class | type | name+name | geometry | - | W1 | highway | residential | Rose Street | :w-north | - | N2 | place | city | Strange Town | :p-N1 | + | W1 | highway | residential | Rose Street | 10,11 | + | R1 | place | city | Strange Town | (100,101,102,103,100) | When importing When sending search query "23 Moon Sun, Strange Town" Then results contain @@ -194,14 +213,17 @@ Feature: Creation of search terms | N1 | Blue house, 23, Moon sun, Strange Town | Scenario: Unnamed POIs doesn't inherit parent name when addr:place is present only in parent address - Given the scene roads-with-pois + Given the grid + | 100 | | | | | 101 | + | | | 1 | | | | + | 103 | 10 | | | 11 | 102 | And the places - | osm | class | type | housenr | addr+place | geometry | - | N1 | place | house | 23 | Walltown | :p-N1 | + | osm | class | type | housenr | addr+place | + | N1 | place | house | 23 | Walltown | And the places | osm | class | type | name+name | addr+city | geometry | - | W1 | highway | residential | Rose Street | Walltown | :w-north | - | N2 | place | suburb | Strange Town | Walltown | :p-N1 | + | W1 | highway | residential | Rose Street | Walltown | 10,11 | + | R1 | place | suburb | Strange Town | Walltown | (100,101,102,103,100) | When importing When sending search query "23 Rose Street, Walltown" Then exactly 1 result is returned @@ -215,13 +237,15 @@ Feature: Creation of search terms | N1 | 23, Walltown, Strange Town | Scenario: Unnamed POIs does inherit parent name when unknown addr:place and addr:street is present - Given the scene roads-with-pois + Given the grid + | | 1 | | | + | 10 | | | 11 | And the places - | osm | class | type | housenr | addr+place | addr+street | geometry | - | N1 | place | house | 23 | Walltown | Lily Street | :p-N1 | + | osm | class | type | housenr | addr+place | addr+street | + | N1 | place | house | 23 | Walltown | Lily Street | And the places | osm | class | type | name+name | geometry | - | W1 | highway | residential | Rose Street | :w-north | + | W1 | highway | residential | Rose Street | 10,11 | When importing Then search_name has no entry for N1 When sending search query "23 Rose Street" @@ -232,13 +256,15 @@ Feature: Creation of search terms Then exactly 0 results are returned Scenario: An unknown addr:street is ignored - Given the scene roads-with-pois + Given the grid + | | 1 | | | + | 10 | | | 11 | And the places - | osm | class | type | housenr | addr+street | geometry | - | N1 | place | house | 23 | Lily Street | :p-N1 | + | osm | class | type | housenr | addr+street | + | N1 | place | house | 23 | Lily Street | And the places | osm | class | type | name+name | geometry | - | W1 | highway | residential | Rose Street | :w-north | + | W1 | highway | residential | Rose Street | 10,11 | When importing Then search_name has no entry for N1 When sending search query "23 Rose Street" @@ -249,13 +275,15 @@ Feature: Creation of search terms Then exactly 0 results are returned Scenario: Named POIs get unknown address tags added in the search_name table - Given the scene roads-with-pois + Given the grid + | | 1 | | | + | 10 | | | 11 | And the places - | osm | class | type | name+name | housenr | addr+city | geometry | - | N1 | place | house | Green Moss | 26 | Walltown | :p-N1 | + | osm | class | type | name+name | housenr | addr+city | + | N1 | place | house | Green Moss | 26 | Walltown | And the places | osm | class | type | name+name | geometry | - | W1 | highway | residential | Rose Street | :w-north | + | W1 | highway | residential | Rose Street | 10,11 | When importing Then search_name contains | object | name_vector | nameaddress_vector | @@ -282,14 +310,17 @@ Feature: Creation of search terms | N1 | Green Moss, 26, Rose Street | Scenario: Named POI doesn't inherit parent name when addr:place is present only in parent address - Given the scene roads-with-pois + Given the grid + | 100 | | | | | 101 | + | | | 1 | | | | + | 103 | 10 | | | 11 | 102 | And the places - | osm | class | type | name+name | addr+place | geometry | - | N1 | place | house | Green Moss | Walltown | :p-N1 | + | osm | class | type | name+name | addr+place | + | N1 | place | house | Green Moss | Walltown | And the places | osm | class | type | name+name | geometry | - | W1 | highway | residential | Rose Street | :w-north | - | N2 | place | suburb | Strange Town | :p-N1 | + | W1 | highway | residential | Rose Street | 10,11 | + | R1 | place | suburb | Strange Town | (100,101,102,103,100) | When importing When sending search query "Green Moss, Rose Street, Walltown" Then exactly 0 result is returned @@ -299,60 +330,71 @@ Feature: Creation of search terms | N1 | Green Moss, Walltown, Strange Town | Scenario: Named POIs inherit address from parent - Given the scene roads-with-pois + Given the grid + | | 1 | | | + | 10 | | | 11 | And the places | osm | class | type | name | geometry | - | N1 | place | house | foo | :p-N1 | - | W1 | highway | residential | the road | :w-north | + | N1 | place | house | foo | 1 | + | W1 | highway | residential | the road | 10,11 | When importing Then search_name contains | object | name_vector | nameaddress_vector | | N1 | foo | #the road | Scenario: Some addr: tags are added to address - Given the scene roads-with-pois + Given the grid + | | 2 | 3 | | + | 10 | | | 11 | And the places - | osm | class | type | name | geometry | - | N2 | place | city | bonn | 81 81 | - | N3 | place | suburb | smalltown| 80 81 | + | osm | class | type | name | + | N2 | place | city | bonn | + | N3 | place | suburb | smalltown| And the named places | osm | class | type | addr+city | addr+municipality | addr+suburb | geometry | - | W1 | highway | service | bonn | New York | Smalltown | :w-north | + | W1 | highway | service | bonn | New York | Smalltown | 10,11 | When importing Then search_name contains | object | nameaddress_vector | | W1 | bonn, new, york, smalltown | Scenario: A known addr:* tag is added even if the name is unknown - Given the scene roads-with-pois + Given the grid + | 10 | | | | 11 | And the places | osm | class | type | name | addr+city | geometry | - | W1 | highway | residential | Road | Nandu | :w-north | + | W1 | highway | residential | Road | Nandu | 10,11 | When importing Then search_name contains | object | nameaddress_vector | | W1 | nandu | Scenario: addr:postcode is not added to the address terms - Given the scene roads-with-pois + Given the grid with origin DE + | | 1 | | | + | 10 | | | 11 | And the places - | osm | class | type | name+ref | geometry | - | N1 | place | state | 12345 | 80 80 | + | osm | class | type | name+ref | + | N1 | place | state | 12345 | And the named places | osm | class | type | addr+postcode | geometry | - | W1 | highway | residential | 12345 | :w-north | + | W1 | highway | residential | 12345 | 10,11 | When importing Then search_name contains not | object | nameaddress_vector | | W1 | 12345 | Scenario: a linked place does not show up in search name + Given the 0.01 grid + | 10 | | 11 | + | | 2 | | + | 13 | | 12 | Given the named places | osm | class | type | admin | geometry | - | R13 | boundary | administrative | 9 | poly-area:0.01 | + | R13 | boundary | administrative | 9 | (10,11,12,13,10) | And the named places - | osm | class | type | geometry | - | N2 | place | city | 0.1 0.1 | + | osm | class | type | + | N2 | place | city | And the relations | id | members | tags+type | | 13 | N2:label | boundary | @@ -363,12 +405,13 @@ Feature: Creation of search terms And search_name has no entry for N2 Scenario: a linked waterway does not show up in search name - Given the scene split-road + Given the grid + | 1 | | 2 | | 3 | And the places | osm | class | type | name | geometry | - | W1 | waterway | river | Rhein | :w-2 | - | W2 | waterway | river | Rhein | :w-3 | - | R13 | waterway | river | Rhein | :w-1 + :w-2 + :w-3 | + | W1 | waterway | river | Rhein | 1,2 | + | W2 | waterway | river | Rhein | 2,3 | + | R13 | waterway | river | Rhein | 1,2,3 | And the relations | id | members | tags+type | | 13 | W1,W2:main_stream | waterway | diff --git a/test/bdd/db/query/linking.feature b/test/bdd/db/query/linking.feature index bd8e1da0..351f8871 100644 --- a/test/bdd/db/query/linking.feature +++ b/test/bdd/db/query/linking.feature @@ -3,12 +3,16 @@ Feature: Searching linked places Tests that information from linked places can be searched correctly Scenario: Additional names from linked places are searchable + Given the 0.1 grid + | 10 | | 11 | + | | 2 | | + | 13 | | 12 | Given the places | osm | class | type | admin | name | geometry | - | R13 | boundary | administrative | 6 | Garbo | poly-area:0.1 | + | R13 | boundary | administrative | 6 | Garbo | (10,11,12,13,10) | Given the places - | osm | class | type | admin | name+name:it | geometry | - | N2 | place | hamlet | 15 | Vario | 0.006 0.00001 | + | osm | class | type | admin | name+name:it | + | N2 | place | hamlet | 15 | Vario | And the relations | id | members | tags+type | | 13 | N2:label | boundary | @@ -31,12 +35,16 @@ Feature: Searching linked places Scenario: Differing names from linked places are searchable + Given the 0.1 grid + | 10 | | 11 | + | | 2 | | + | 13 | | 12 | Given the places | osm | class | type | admin | name | geometry | - | R13 | boundary | administrative | 6 | Garbo | poly-area:0.1 | + | R13 | boundary | administrative | 6 | Garbo | (10,11,12,13,10) | Given the places - | osm | class | type | admin | name | geometry | - | N2 | place | hamlet | 15 | Vario | 0.006 0.00001 | + | osm | class | type | admin | name | + | N2 | place | hamlet | 15 | Vario | And the relations | id | members | tags+type | | 13 | N2:label | boundary | diff --git a/test/bdd/db/query/normalization.feature b/test/bdd/db/query/normalization.feature index 162a59a4..f91c0050 100644 --- a/test/bdd/db/query/normalization.feature +++ b/test/bdd/db/query/normalization.feature @@ -138,10 +138,13 @@ Feature: Import and search of names | 0 | N3 | Scenario: Landuse with name are found + Given the grid + | 1 | 2 | + | 3 | | Given the places | osm | class | type | name | geometry | - | R1 | natural | meadow | landuse1 | (0 0, 1 0, 1 1, 0 1, 0 0) | - | R2 | landuse | industrial | landuse2 | (0 0, -1 0, -1 -1, 0 -1, 0 0) | + | R1 | natural | meadow | landuse1 | (1,2,3,1) | + | R2 | landuse | industrial | landuse2 | (2,3,1,2) | When importing When sending search query "landuse1" Then results contain @@ -153,9 +156,12 @@ Feature: Import and search of names | 0 | R2 | Scenario: Postcode boundaries without ref + Given the grid with origin FR + | | 2 | | + | 1 | | 3 | Given the places | osm | class | type | postcode | geometry | - | R1 | boundary | postal_code | 12345 | (0 0, 1 0, 1 1, 0 1, 0 0) | + | R1 | boundary | postal_code | 12345 | (1,2,3,1) | When importing When sending search query "12345" Then results contain diff --git a/test/bdd/db/query/search_simple.feature b/test/bdd/db/query/search_simple.feature index 3672bb89..5fef3132 100644 --- a/test/bdd/db/query/search_simple.feature +++ b/test/bdd/db/query/search_simple.feature @@ -13,9 +13,12 @@ Feature: Searching of simple objects | 0 | N1 | place | village | 10 -10 | Scenario: Updating postcode in postcode boundaries without ref + Given the grid + | 1 | 2 | + | 4 | 3 | Given the places | osm | class | type | postcode | geometry | - | R1 | boundary | postal_code | 12345 | poly-area:1.0 | + | R1 | boundary | postal_code | 12345 | (1,2,3,4,1) | When importing And sending search query "12345" Then results contain @@ -23,7 +26,7 @@ Feature: Searching of simple objects | 0 | R1 | When updating places | osm | class | type | postcode | geometry | - | R1 | boundary | postal_code | 54321 | poly-area:1.0 | + | R1 | boundary | postal_code | 54321 | (1,2,3,4,1) | And sending search query "12345" Then exactly 0 results are returned When sending search query "54321" diff --git a/test/bdd/db/update/country.feature b/test/bdd/db/update/country.feature index db68f420..794b0d0e 100644 --- a/test/bdd/db/update/country.feature +++ b/test/bdd/db/update/country.feature @@ -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 | diff --git a/test/bdd/db/update/interpolation.feature b/test/bdd/db/update/interpolation.feature index 5c07f434..ac6b8a44 100644 --- a/test/bdd/db/update/interpolation.feature +++ b/test/bdd/db/update/interpolation.feature @@ -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 | diff --git a/test/bdd/db/update/linked_places.feature b/test/bdd/db/update/linked_places.feature index 8bc9585f..3b34039d 100644 --- a/test/bdd/db/update/linked_places.feature +++ b/test/bdd/db/update/linked_places.feature @@ -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' | diff --git a/test/bdd/db/update/naming.feature b/test/bdd/db/update/naming.feature index 4023e3f9..c6ff1388 100644 --- a/test/bdd/db/update/naming.feature +++ b/test/bdd/db/update/naming.feature @@ -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 diff --git a/test/bdd/db/update/parenting.feature b/test/bdd/db/update/parenting.feature index c962fc7e..1a23d903 100644 --- a/test/bdd/db/update/parenting.feature +++ b/test/bdd/db/update/parenting.feature @@ -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 diff --git a/test/bdd/db/update/postcode.feature b/test/bdd/db/update/postcode.feature index c2fb30ce..c6696dda 100644 --- a/test/bdd/db/update/postcode.feature +++ b/test/bdd/db/update/postcode.feature @@ -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 diff --git a/test/bdd/db/update/simple.feature b/test/bdd/db/update/simple.feature index ccc42c2a..73abcd22 100644 --- a/test/bdd/db/update/simple.feature +++ b/test/bdd/db/update/simple.feature @@ -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 | diff --git a/test/bdd/environment.py b/test/bdd/environment.py index ee07e602..c11a2c8c 100644 --- a/test/bdd/environment.py +++ b/test/bdd/environment.py @@ -50,7 +50,6 @@ def before_scenario(context, scenario): context.nominatim.setup_api_db() elif 'UNKNOWNDB' in context.tags: context.nominatim.setup_unknown_db() - context.scene = None def after_scenario(context, scenario): if 'DB' in context.tags: diff --git a/test/bdd/steps/geometry_alias.py b/test/bdd/steps/geometry_alias.py new file mode 100644 index 00000000..a9b4ec8c --- /dev/null +++ b/test/bdd/steps/geometry_alias.py @@ -0,0 +1,262 @@ +# SPDX-License-Identifier: GPL-2.0-only +# +# This file is part of Nominatim. (https://nominatim.org) +# +# Copyright (C) 2022 by the Nominatim developer community. +# For a full list of authors see the git log. +""" +Collection of aliases for various world coordinates. +""" + +ALIASES = { +# Country aliases +'AD': (1.58972, 42.54241), +'AE': (54.61589, 24.82431), +'AF': (65.90264, 34.84708), +'AG': (-61.72430, 17.069), +'AI': (-63.10571, 18.25461), +'AL': (19.84941, 40.21232), +'AM': (44.64229, 40.37821), +'AO': (16.21924, -12.77014), +'AQ': (44.99999, -75.65695), +'AR': (-61.10759, -34.37615), +'AS': (-170.68470, -14.29307), +'AT': (14.25747, 47.36542), +'AU': (138.23155, -23.72068), +'AW': (-69.98255, 12.555), +'AX': (19.91839, 59.81682), +'AZ': (48.38555, 40.61639), +'BA': (17.18514, 44.25582), +'BB': (-59.53342, 13.19), +'BD': (89.75989, 24.34205), +'BE': (4.90078, 50.34682), +'BF': (-0.56743, 11.90471), +'BG': (24.80616, 43.09859), +'BH': (50.52032, 25.94685), +'BI': (29.54561, -2.99057), +'BJ': (2.70062, 10.02792), +'BL': (-62.79349, 17.907), +'BM': (-64.77406, 32.30199), +'BN': (114.52196, 4.28638), +'BO': (-62.02473, -17.77723), +'BQ': (-63.14322, 17.566), +'BR': (-45.77065, -9.58685), +'BS': (-77.60916, 23.8745), +'BT': (90.01350, 27.28137), +'BV': (3.35744, -54.4215), +'BW': (23.51505, -23.48391), +'BY': (26.77259, 53.15885), +'BZ': (-88.63489, 16.33951), +'CA': (-107.74817, 67.12612), +'CC': (96.84420, -12.01734), +'CD': (24.09544, -1.67713), +'CF': (22.58701, 5.98438), +'CG': (15.78875, 0.40388), +'CH': (7.65705, 46.57446), +'CI': (-6.31190, 6.62783), +'CK': (-159.77835, -21.23349), +'CL': (-70.41790, -53.77189), +'CM': (13.26022, 5.94519), +'CN': (96.44285, 38.04260), +'CO': (-72.52951, 2.45174), +'CR': (-83.83314, 9.93514), +'CU': (-80.81673, 21.88852), +'CV': (-24.50810, 14.929), +'CW': (-68.96409, 12.1845), +'CX': (105.62411, -10.48417), +'CY': (32.95922, 35.37010), +'CZ': (16.32098, 49.50692), +'DE': (9.30716, 50.21289), +'DJ': (42.96904, 11.41542), +'DK': (9.18490, 55.98916), +'DM': (-61.00358, 15.65470), +'DO': (-69.62855, 18.58841), +'DZ': (4.24749, 25.79721), +'EC': (-77.45831, -0.98284), +'EE': (23.94288, 58.43952), +'EG': (28.95293, 28.17718), +'EH': (-13.69031, 25.01241), +'ER': (39.01223, 14.96033), +'ES': (-2.59110, 38.79354), +'ET': (38.61697, 7.71399), +'FI': (26.89798, 63.56194), +'FJ': (177.91853, -17.74237), +'FK': (-58.99044, -51.34509), +'FM': (151.95358, 8.5045), +'FO': (-6.60483, 62.10000), +'FR': (0.28410, 47.51045), +'GA': (10.81070, -0.07429), +'GB': (-0.92823, 52.01618), +'GD': (-61.64524, 12.191), +'GE': (44.16664, 42.00385), +'GF': (-53.46524, 3.56188), +'GG': (-2.50580, 49.58543), +'GH': (-0.46348, 7.16051), +'GI': (-5.32053, 36.11066), +'GL': (-33.85511, 74.66355), +'GM': (-16.40960, 13.25), +'GN': (-13.83940, 10.96291), +'GP': (-61.68712, 16.23049), +'GQ': (10.23973, 1.43119), +'GR': (23.17850, 39.06206), +'GS': (-36.49430, -54.43067), +'GT': (-90.74368, 15.20428), +'GU': (144.73362, 13.44413), +'GW': (-14.83525, 11.92486), +'GY': (-58.45167, 5.73698), +'HK': (114.18577, 22.34923), +'HM': (73.68230, -53.22105), +'HN': (-86.95414, 15.23820), +'HR': (17.49966, 45.52689), +'HT': (-73.51925, 18.32492), +'HU': (20.35362, 47.51721), +'ID': (123.34505, -0.83791), +'IE': (-9.00520, 52.87725), +'IL': (35.46314, 32.86165), +'IM': (-4.86740, 54.023), +'IN': (88.67620, 27.86155), +'IO': (71.42743, -6.14349), +'IQ': (42.58109, 34.26103), +'IR': (56.09355, 30.46751), +'IS': (-17.51785, 64.71687), +'IT': (10.42639, 44.87904), +'JE': (-2.19261, 49.12458), +'JM': (-76.84020, 18.3935), +'JO': (36.55552, 30.75741), +'JP': (138.72531, 35.92099), +'KE': (36.90602, 1.08512), +'KG': (76.15571, 41.66497), +'KH': (104.31901, 12.95555), +'KI': (173.63353, 0.139), +'KM': (44.31474, -12.241), +'KN': (-62.69379, 17.2555), +'KP': (126.65575, 39.64575), +'KR': (127.27740, 36.41388), +'KW': (47.30684, 29.69180), +'KY': (-81.07455, 19.29949), +'KZ': (72.00811, 49.88855), +'LA': (102.44391, 19.81609), +'LB': (35.48464, 33.41766), +'LC': (-60.97894, 13.891), +'LI': (9.54693, 47.15934), +'LK': (80.38520, 8.41649), +'LR': (-11.16960, 4.04122), +'LS': (28.66984, -29.94538), +'LT': (24.51735, 55.49293), +'LU': (6.08649, 49.81533), +'LV': (23.51033, 56.67144), +'LY': (15.36841, 28.12177), +'MA': (-4.03061, 33.21696), +'MC': (7.47743, 43.62917), +'MD': (29.61725, 46.66517), +'ME': (19.72291, 43.02441), +'MF': (-63.06666, 18.08102), +'MG': (45.86378, -20.50245), +'MH': (171.94982, 5.983), +'MK': (21.42108, 41.08980), +'ML': (-1.93310, 16.46993), +'MM': (95.54624, 21.09620), +'MN': (99.81138, 48.18615), +'MO': (113.56441, 22.16209), +'MP': (145.21345, 14.14902), +'MQ': (-60.81128, 14.43706), +'MR': (-9.42324, 22.59251), +'MS': (-62.19455, 16.745), +'MT': (14.38363, 35.94467), +'MU': (57.55121, -20.41), +'MV': (73.39292, 4.19375), +'MW': (33.95722, -12.28218), +'MX': (-105.89221, 25.86826), +'MY': (112.71154, 2.10098), +'MZ': (37.58689, -13.72682), +'NA': (16.68569, -21.46572), +'NC': (164.95322, -20.38889), +'NE': (10.06041, 19.08273), +'NF': (167.95718, -29.0645), +'NG': (10.17781, 10.17804), +'NI': (-85.87974, 13.21715), +'NL': (-68.57062, 12.041), +'NO': (23.11556, 70.09934), +'NP': (83.36259, 28.13107), +'NR': (166.93479, -0.5275), +'NU': (-169.84873, -19.05305), +'NZ': (167.97209, -45.13056), +'OM': (56.86055, 20.47413), +'PA': (-79.40160, 8.80656), +'PE': (-78.66540, -7.54711), +'PF': (-145.05719, -16.70862), +'PG': (146.64600, -7.37427), +'PH': (121.48359, 15.09965), +'PK': (72.11347, 31.14629), +'PL': (17.88136, 52.77182), +'PM': (-56.19515, 46.78324), +'PN': (-130.10642, -25.06955), +'PR': (-65.88755, 18.37169), +'PS': (35.39801, 32.24773), +'PT': (-8.45743, 40.11154), +'PW': (134.49645, 7.3245), +'PY': (-59.51787, -22.41281), +'QA': (51.49903, 24.99816), +'RE': (55.77345, -21.36388), +'RO': (26.37632, 45.36120), +'RS': (20.40371, 44.56413), +'RU': (116.44060, 59.06780), +'RW': (29.57882, -1.62404), +'SA': (47.73169, 22.43790), +'SB': (164.63894, -10.23606), +'SC': (46.36566, -9.454), +'SD': (28.14720, 14.56423), +'SE': (15.68667, 60.35568), +'SG': (103.84187, 1.304), +'SH': (-12.28155, -37.11546), +'SI': (14.04738, 46.39085), +'SJ': (15.27552, 79.23365), +'SK': (20.41603, 48.86970), +'SL': (-11.47773, 8.78156), +'SM': (12.46062, 43.94279), +'SN': (-15.37111, 14.99477), +'SO': (46.93383, 9.34094), +'SR': (-55.42864, 4.56985), +'SS': (28.13573, 8.50933), +'ST': (6.61025, 0.2215), +'SV': (-89.36665, 13.43072), +'SX': (-63.15393, 17.9345), +'SY': (38.15513, 35.34221), +'SZ': (31.78263, -26.14244), +'TC': (-71.32554, 21.35), +'TD': (17.42092, 13.46223), +'TF': (137.5, -67.5), +'TG': (1.06983, 7.87677), +'TH': (102.00877, 16.42310), +'TJ': (71.91349, 39.01527), +'TK': (-171.82603, -9.20990), +'TL': (126.22520, -8.72636), +'TM': (57.71603, 39.92534), +'TN': (9.04958, 34.84199), +'TO': (-176.99320, -23.11104), +'TR': (32.82002, 39.86350), +'TT': (-60.70793, 11.1385), +'TV': (178.77499, -9.41685), +'TW': (120.30074, 23.17002), +'TZ': (33.53892, -5.01840), +'UA': (33.44335, 49.30619), +'UG': (32.96523, 2.08584), +'UM': (-169.50993, 16.74605), +'US': (-116.39535, 40.71379), +'UY': (-56.46505, -33.62658), +'UZ': (61.35529, 42.96107), +'VA': (12.33197, 42.04931), +'VC': (-61.09905, 13.316), +'VE': (-64.88323, 7.69849), +'VG': (-64.62479, 18.419), +'VI': (-64.88950, 18.32263), +'VN': (104.20179, 10.27644), +'VU': (167.31919, -15.88687), +'WF': (-176.20781, -13.28535), +'WS': (-172.10966, -13.85093), +'YE': (45.94562, 16.16338), +'YT': (44.93774, -12.60882), +'ZA': (23.19488, -30.43276), +'ZM': (26.38618, -14.39966), +'ZW': (30.12419, -19.86907) +} diff --git a/test/bdd/steps/geometry_factory.py b/test/bdd/steps/geometry_factory.py index d62ad9c5..a8fda5ff 100644 --- a/test/bdd/steps/geometry_factory.py +++ b/test/bdd/steps/geometry_factory.py @@ -7,23 +7,21 @@ from pathlib import Path import os +from steps.geometry_alias import ALIASES + class GeometryFactory: - """ Provides functions to create geometries from scenes and data grids. + """ Provides functions to create geometries from coordinates and data grids. """ def __init__(self): - defpath = Path(__file__) / '..' / '..' / '..' / 'scenes' / 'data' - self.scene_path = os.environ.get('SCENE_PATH', defpath.resolve()) - self.scene_cache = {} self.grid = {} - def parse_geometry(self, geom, scene): + def parse_geometry(self, geom): """ Create a WKT SQL term for the given geometry. The function understands the following formats: - []: - Geometry from a scene. If the scene is omitted, use the - default scene. + country: + Point geoemtry guaranteed to be in the given country

Point geometry

,...,

@@ -35,8 +33,10 @@ class GeometryFactory: number. In the latter case it must refer to a point in a previously defined grid. """ - if geom.find(':') >= 0: - return "ST_SetSRID({}, 4326)".format(self.get_scene_geometry(scene, geom)) + if geom.startswith('country:'): + ccode = geom[8:].upper() + assert ccode in ALIASES, "Geometry error: unknown country " + ccode + return "ST_SetSRID('POINT({} {})'::geometry, 4326)".format(*ALIASES[ccode]) if geom.find(',') < 0: out = "POINT({})".format(self.mk_wkt_point(geom)) @@ -47,6 +47,7 @@ class GeometryFactory: return "ST_SetSRID('{}'::geometry, 4326)".format(out) + def mk_wkt_point(self, point): """ Parse a point description. The point may either consist of 'x y' cooordinates or a number @@ -64,6 +65,7 @@ class GeometryFactory: assert pt is not None, "Scenario error: Point '{}' not found in grid".format(geom) return "{} {}".format(*pt) + def mk_wkt_points(self, geom): """ Parse a list of points. The list must be a comma-separated list of points. Points @@ -71,57 +73,21 @@ class GeometryFactory: """ return ','.join([self.mk_wkt_point(x) for x in geom.split(',')]) - def get_scene_geometry(self, default_scene, name): - """ Load the geometry from a scene. - """ - geoms = [] - for obj in name.split('+'): - oname = obj.strip() - if oname.startswith(':'): - assert default_scene is not None, "Scenario error: You need to set a scene" - defscene = self.load_scene(default_scene) - wkt = defscene[oname[1:]] - else: - scene, obj = oname.split(':', 2) - scene_geoms = self.load_scene(scene) - wkt = scene_geoms[obj] - - geoms.append("'{}'::geometry".format(wkt)) - - if len(geoms) == 1: - return geoms[0] - - return 'ST_LineMerge(ST_Collect(ARRAY[{}]))'.format(','.join(geoms)) - - def load_scene(self, name): - """ Load a scene from a file. - """ - if name in self.scene_cache: - return self.scene_cache[name] - - scene = {} - with open(Path(self.scene_path) / "{}.wkt".format(name), 'r') as fd: - for line in fd: - if line.strip(): - obj, wkt = line.split('|', 2) - scene[obj.strip()] = wkt.strip() - self.scene_cache[name] = scene - return scene - - def set_grid(self, lines, grid_step): + def set_grid(self, lines, grid_step, origin=(0.0, 0.0)): """ Replace the grid with one from the given lines. """ self.grid = {} - y = 0 + y = origin[1] for line in lines: - x = 0 + x = origin[0] for pt_id in line: if pt_id.isdigit(): self.grid[int(pt_id)] = (x, y) x += grid_step y += grid_step + def grid_node(self, nodeid): """ Get the coordinates for the given grid node. """ diff --git a/test/bdd/steps/place_inserter.py b/test/bdd/steps/place_inserter.py index 9cf3f3d3..6e7e6a75 100644 --- a/test/bdd/steps/place_inserter.py +++ b/test/bdd/steps/place_inserter.py @@ -83,7 +83,7 @@ class PlaceColumn: self._add_hstore('address', 'country', value) def _set_key_geometry(self, value): - self.geometry = self.context.osm.parse_geometry(value, self.context.scene) + self.geometry = self.context.osm.parse_geometry(value) assert self.geometry is not None, "Bad geometry: {}".format(value) def _add_hstore(self, column, key, value): diff --git a/test/bdd/steps/steps_db_ops.py b/test/bdd/steps/steps_db_ops.py index 63c5120e..44c82b01 100644 --- a/test/bdd/steps/steps_db_ops.py +++ b/test/bdd/steps/steps_db_ops.py @@ -99,6 +99,11 @@ def import_and_index_data_from_place_table(context): check_database_integrity(context) + # 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() + @when("updating places") def update_place_table(context): """ Update the place table with the given data. Also runs all triggers @@ -112,6 +117,12 @@ def update_place_table(context): context.nominatim.reindex_placex(context.db) check_database_integrity(context) + # 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() + + @when("updating postcodes") def update_postcodes(context): """ Rerun the calculation of postcodes. @@ -131,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("(?Pplacex|place) contains(?P exactly)?") diff --git a/test/bdd/steps/steps_osm_data.py b/test/bdd/steps/steps_osm_data.py index a48d9cd6..94f72796 100644 --- a/test/bdd/steps/steps_osm_data.py +++ b/test/bdd/steps/steps_osm_data.py @@ -11,6 +11,8 @@ from pathlib import Path from nominatim.tools.exec_utils import run_osm2pgsql +from geometry_alias import ALIASES + def get_osm2pgsql_options(nominatim_env, fname, append): return dict(import_file=fname, osm2pgsql=str(nominatim_env.build_dir / 'osm2pgsql' / 'osm2pgsql'), @@ -45,12 +47,8 @@ def write_opl_file(opl, grid): return fd.name -@given(u'the scene (?P.+)') -def set_default_scene(context, scene): - context.scene = scene - -@given(u'the ([0-9.]+ )?grid') -def define_node_grid(context, grid_step): +@given(u'the ([0-9.]+ )?grid(?: with origin (?P.*))?') +def define_node_grid(context, grid_step, origin): """ Define a grid of node positions. Use a table to define the grid. The nodes must be integer ids. Optionally @@ -61,8 +59,22 @@ def define_node_grid(context, grid_step): else: grid_step = 0.00001 + if origin: + if ',' in origin: + # TODO coordinate + coords = origin.split(',') + if len(coords) != 2: + raise RuntimeError('Grid origin expects orgin with x,y coordinates.') + origin = (float(coords[0]), float(coords[1])) + elif origin in ALIASES: + origin = ALIASES[origin] + else: + raise RuntimeError('Grid origin must be either coordinate or alias.') + else: + origin = (0.0, 0.0) + context.osm.set_grid([context.table.headings] + [list(h) for h in context.table], - grid_step) + grid_step, origin) @when(u'loading osm data') diff --git a/test/bdd/steps/table_compare.py b/test/bdd/steps/table_compare.py index ca6c3020..cf2e12f1 100644 --- a/test/bdd/steps/table_compare.py +++ b/test/bdd/steps/table_compare.py @@ -157,11 +157,15 @@ class DBRow: ST_SetSRID('{geomtxt}'::geometry, 4326))""".format(**self.db_row)) return cur.fetchone()[0] - x, y = expected.split(' ') + if ' ' in expected: + x, y = expected.split(' ') + else: + x, y = self.context.osm.grid_node(int(expected)) + return Almost(float(x)) == self.db_row['cx'] and Almost(float(y)) == self.db_row['cy'] def _has_geometry(self, expected): - geom = self.context.osm.parse_geometry(expected, self.context.scene) + geom = self.context.osm.parse_geometry(expected) with self.context.db.cursor() as cur: cur.execute("""SELECT ST_Equals(ST_SnapToGrid({}, 0.00001, 0.00001), ST_SnapToGrid(ST_SetSRID('{}'::geometry, 4326), 0.00001, 0.00001))""".format( diff --git a/test/scenes/bin/Makefile b/test/scenes/bin/Makefile deleted file mode 100644 index d508bbac..00000000 --- a/test/scenes/bin/Makefile +++ /dev/null @@ -1,27 +0,0 @@ -CXXFLAGS += -O3 -#CXXFLAGS += -g -CXXFLAGS += -std=c++11 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -CXXFLAGS += -I../../../../libosmium/include - -OS:=$(shell uname -s) -ifeq ($(OS),Darwin) -CXXFLAGS += -stdlib=libc++ -LDFLAGS += -stdlib=libc++ -endif - -CXXFLAGS_WARNINGS := -Wall -Wextra -pedantic -Wredundant-decls -Wdisabled-optimization -Wctor-dtor-privacy -Wnon-virtual-dtor -Woverloaded-virtual -Wsign-promo -Wold-style-cast - -LIB_EXPAT := -lexpat -LIB_PBF := -pthread -lz -lprotobuf-lite -losmpbf -LIB_GZIP := -lz -LIB_BZIP2 := -lbz2 - -LIB_IO := $(LIB_EXPAT) $(LIB_PBF) $(LIB_GZIP) $(LIB_BZIP2) - -all: - -osm2wkt: osm2wkt.cc - $(CXX) $(CXXFLAGS) $(CXXFLAGS_WARNINGS) -o $@ $< $(LDFLAGS) $(LIB_IO) - -scenarios: osm2wkt - ./make_scenes.sh diff --git a/test/scenes/bin/make_scenes.sh b/test/scenes/bin/make_scenes.sh deleted file mode 100755 index 25340b50..00000000 --- a/test/scenes/bin/make_scenes.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -e -# -# Regenerates wkts for scenarios. -# - -datadir="$( cd "$( dirname "$0" )" && cd ../data && pwd )" - -if [ ! -d "$datadir" ]; then - echo "Cannot find data dir."; - exit -1; -fi - -echo "Using datadir $datadir" -cd $datadir - -# remove old wkts -rm -f $datadir/*.wkt - -# create wkts from SQL scripts -for fl in *.sql; do - echo "Processing $fl.." - cat $fl | psql -d nominatim -t -o ${fl/.sql/.wkt} -done - -# create wkts from .osm files -for fl in *.osm; do - echo "Processing $fl.." - ../bin/osm2wkt $fl -done diff --git a/test/scenes/bin/osm2wkt.cc b/test/scenes/bin/osm2wkt.cc deleted file mode 100644 index 22e74b4d..00000000 --- a/test/scenes/bin/osm2wkt.cc +++ /dev/null @@ -1,141 +0,0 @@ - -// The code in this file is released into the Public Domain. - -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -typedef osmium::index::map::SparseMemArray index_type; - -typedef osmium::handler::NodeLocationsForWays location_handler_type; - -struct AbsoluteIdHandler : public osmium::handler::Handler { - - enum { BASE = 100000000 }; - - void node(osmium::Node& o) { - if (o.id() < 0) - o.set_id(BASE-o.id()); - } - - void way(osmium::Way& o) { - if (o.id() < 0) - o.set_id(BASE-o.id()); - - for (osmium::NodeRef &n: o.nodes()) - if (n.ref() < 0) - n.set_ref(BASE-n.ref()); - } - - void relation(osmium::Relation& o) { - if (o.id() < 0) - o.set_id(BASE-o.id()); - - for (auto &m : o.members()) - if (m.ref() < 0) - m.set_ref(BASE-m.ref()); - } -}; - - -class ExportToWKTHandler : public osmium::handler::Handler { - - osmium::geom::WKTFactory<> m_factory; - std::unordered_map m_files; - -public: - - void node(const osmium::Node& node) { - print_geometry(node.tags(), m_factory.create_point(node)); - } - - void way(const osmium::Way& way) { - if (!way.nodes().empty() - && (!way.is_closed() || !way.tags().get_value_by_key("area"))) - print_geometry(way.tags(), m_factory.create_linestring(way)); - } - - void area(const osmium::Area& area) { - if (!area.from_way() || area.tags().get_value_by_key("area")) - print_geometry(area.tags(), m_factory.create_multipolygon(area)); - } - - void close() { - for (auto& fd : m_files) - fd.second.close(); - } - -private: - void print_geometry(const osmium::TagList& tags, const std::string& wkt) { - const char* scenario = tags.get_value_by_key("test:section"); - const char* id = tags.get_value_by_key("test:id"); - if (scenario && id) { - auto& fd = m_files[std::string(scenario)]; - if (!fd.is_open()) - fd.open(std::string(scenario) + ".wkt"); - fd << id << " | " << wkt << "\n"; - } - } - -}; // class ExportToWKTHandler - -int main(int argc, char* argv[]) { - if (argc != 2) { - std::cerr << "Usage: " << argv[0] << " OSMFILE\n"; - exit(1); - } - - osmium::io::File input_file{argv[1]}; - - // need to sort the data first and make ids absolute - std::cerr << "Read file...\n"; - osmium::io::Reader reader{input_file}; - std::vector changes; - osmium::ObjectPointerCollection objects; - AbsoluteIdHandler abshandler; - while (osmium::memory::Buffer buffer = reader.read()) { - osmium::apply(buffer, abshandler, objects); - changes.push_back(std::move(buffer)); - } - reader.close(); - - std::cerr << "Sort file...\n"; - objects.sort(osmium::object_order_type_id_version()); - - osmium::area::Assembler::config_type assembler_config; - osmium::area::MultipolygonManager mp_manager{assembler_config}; - - std::cerr << "Pass 1...\n"; - index_type index_pos; - index_type index_neg; - location_handler_type location_handler(index_pos, index_neg); - ExportToWKTHandler export_handler; - osmium::apply(objects.begin(), objects.end(), location_handler, - export_handler, mp_manager); - mp_manager.prepare_for_lookup(); - std::cerr << "Pass 1 done\n"; - - - std::cerr << "Pass 2...\n"; - osmium::apply(objects.cbegin(), objects.cend(), mp_manager.handler([&export_handler](osmium::memory::Buffer&& buffer) { - osmium::apply(buffer, export_handler); - })); - - export_handler.close(); - std::cerr << "Pass 2 done\n"; -} - - diff --git a/test/scenes/data/admin-areas.wkt b/test/scenes/data/admin-areas.wkt deleted file mode 100644 index af741d99..00000000 --- a/test/scenes/data/admin-areas.wkt +++ /dev/null @@ -1,19 +0,0 @@ -c1:N | POINT(73.8419358 60.0763887) -c1:E | POINT(73.8393798 60.0488584) -c0 | POINT(73.8679209 60.0588527) -c2:N | POINT(73.896249 60.0631047) -c2:S | POINT(73.8932671 60.0434346) -c2:E | POINT(73.9162704 60.0471569) -c1:W | POINT(73.8990179 60.055876) -c2:W | POINT(73.8568453 60.0597032) -w2N | LINESTRING(73.8836825 60.0612977,73.8880489 60.0598094,73.8953972 60.0601283,73.9033844 60.058959) -w1W:2W | LINESTRING(73.8523722 60.0497092,73.85791 60.0520485,73.8617439 60.0573645,73.8706896 60.0554508) -building:w2N | LINESTRING(73.8963618 60.0604955,73.8961463 60.0602249,73.8967091 60.0601132,73.8969246 60.0603838,73.8963618 60.0604955) -b0 | MULTIPOLYGON(((73.8012539 60.0573645,73.8225532 60.0371591,73.8493903 60.035457,73.8843212 60.0356698,73.9049815 60.0358825,73.9192521 60.0356698,73.9260679 60.0514105,73.9216633 60.0591056,73.9141402 60.0722448,73.8804873 60.070332,73.8719676 60.0917916,73.8255351 60.0875433,73.8084956 60.0758576,73.8012539 60.0573645))) -b1:N | MULTIPOLYGON(((73.8012539 60.0573645,73.8447045 60.0611915,73.8692843 60.0674706,73.8804873 60.070332,73.8719676 60.0917916,73.8255351 60.0875433,73.8084956 60.0758576,73.8012539 60.0573645))) -b2:S | MULTIPOLYGON(((73.8694117 60.0507725,73.8843212 60.0356698,73.9049815 60.0358825,73.9075368 60.0523758,73.8830432 60.0517295,73.8694117 60.0507725))) -b1:W | MULTIPOLYGON(((73.8012539 60.0573645,73.8225532 60.0371591,73.8493903 60.035457,73.8843212 60.0356698,73.8694117 60.0507725,73.8447045 60.0611915,73.8012539 60.0573645))) -b1:E | MULTIPOLYGON(((73.8447045 60.0611915,73.8694117 60.0507725,73.8843212 60.0356698,73.9049815 60.0358825,73.9192521 60.0356698,73.9260679 60.0514105,73.9216633 60.0591056,73.9141402 60.0722448,73.8804873 60.070332,73.8692843 60.0674706,73.8447045 60.0611915))) -b2:E | MULTIPOLYGON(((73.9049815 60.0358825,73.9192521 60.0356698,73.9260679 60.0514105,73.9216633 60.0591056,73.9075368 60.0523758,73.9049815 60.0358825))) -b2:N | MULTIPOLYGON(((73.8692843 60.0674706,73.8830432 60.0517295,73.9075368 60.0523758,73.9216633 60.0591056,73.9141402 60.0722448,73.8804873 60.070332,73.8692843 60.0674706))) -b2:W | MULTIPOLYGON(((73.8447045 60.0611915,73.8694117 60.0507725,73.8830432 60.0517295,73.8692843 60.0674706,73.8447045 60.0611915))) diff --git a/test/scenes/data/admin.osm b/test/scenes/data/admin.osm deleted file mode 100644 index bfe4340e..00000000 --- a/test/scenes/data/admin.osm +++ /dev/null @@ -1,250 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/scenes/data/building-on-street-corner.wkt b/test/scenes/data/building-on-street-corner.wkt deleted file mode 100644 index 24da78f1..00000000 --- a/test/scenes/data/building-on-street-corner.wkt +++ /dev/null @@ -1,7 +0,0 @@ -n-edge-NS | POINT(1.0040019 2.000324) -n-inner | POINT(1.0039385 2.0003548) -n-outer | POINT(1.0039478 2.0004676) -n-edge-WE | POINT(1.0039599 2.0002345) -w-WE | LINESTRING(1.0031759 2.0002316,1.0040361 2.0002211,1.0042735 2.0002264) -w-NS | LINESTRING(1.0040414 2.0001051,1.0040361 2.0002211,1.0040364 2.0006377) -w-building | MULTIPOLYGON(((1.0039037 2.0002347,1.0039599 2.0002345,1.0040016 2.0002344,1.0040019 2.000324,1.0040023 2.0004386,1.0039043 2.0004389,1.0039037 2.0002347))) diff --git a/test/scenes/data/building-with-parallel-streets.wkt b/test/scenes/data/building-with-parallel-streets.wkt deleted file mode 100644 index c84978e0..00000000 --- a/test/scenes/data/building-with-parallel-streets.wkt +++ /dev/null @@ -1,7 +0,0 @@ -n-south-w | POINT(1.0031633 2.001023) -n-south-e | POINT(1.0043359 2.0010068) -n-north-w | POINT(1.0031511 2.0012655) -n-north-e | POINT(1.0043238 2.0012493) -w-south | LINESTRING(1.0031633 2.001023,1.0036943 2.0010149,1.0040717 2.0010203,1.0043359 2.0010068) -w-north | LINESTRING(1.0031511 2.0012655,1.0036822 2.0012574,1.0040596 2.0012628,1.0043238 2.0012493) -w-building | LINESTRING(1.0036157 2.0011891,1.0036166 2.0010787,1.0038457 2.0010805,1.0038448 2.001191,1.0036157 2.0011891) diff --git a/test/scenes/data/country.sql b/test/scenes/data/country.sql deleted file mode 100644 index b3b451f7..00000000 --- a/test/scenes/data/country.sql +++ /dev/null @@ -1 +0,0 @@ -select country_code, st_astext(st_pointonsurface(st_collect(geometry))) from country_osm_grid group by country_code order by country_code diff --git a/test/scenes/data/country.wkt b/test/scenes/data/country.wkt deleted file mode 100644 index dd14d79b..00000000 --- a/test/scenes/data/country.wkt +++ /dev/null @@ -1,250 +0,0 @@ - ad | POINT(1.58972361752509 42.54241545) - ae | POINT(54.6158905029297 24.8243131637573) - af | POINT(65.9026412963867 34.8470859527588) - ag | POINT(-61.7243069800293 17.069) - ai | POINT(-63.1057155298182 18.2546197) - al | POINT(19.8494176864624 40.2123275624912) - am | POINT(44.6422958374023 40.3782157897949) - ao | POINT(16.2192406654358 -12.7701482772827) - aq | POINT(44.999999975 -75.6569557189941) - ar | POINT(-61.1075973510742 -34.3761558532715) - as | POINT(-170.684700024275 -14.2930755) - at | POINT(14.2574706077576 47.3654232025146) - au | POINT(138.231559753418 -23.7206888198853) - aw | POINT(-69.98255055 12.555) - ax | POINT(19.9183956313477 59.81682435) - az | POINT(48.385555267334 40.6163997650146) - ba | POINT(17.1851491928101 44.2558269500732) - bb | POINT(-59.53342165 13.19) - bd | POINT(89.759895324707 24.3420524597168) - be | POINT(4.90078139305115 50.3468225048828) - bf | POINT(-0.567435041069984 11.9047117233276) - bg | POINT(24.8061628341675 43.0985908508301) - bh | POINT(50.5203291219829 25.94685735) - bi | POINT(29.5456137866089 -2.99057915) - bj | POINT(2.70062518119812 10.0279288291931) - bl | POINT(-62.7934947763772 17.907) - bm | POINT(-64.7740692745195 32.30199165) - bn | POINT(114.521968608887 4.2863885) - bo | POINT(-62.0247344970703 -17.7772369384766) - bq | POINT(-63.1432235610045 17.566) - br | POINT(-45.7706508636475 -9.5868501663208) - bs | POINT(-77.6091675884277 23.8745) - bt | POINT(90.0135078430176 27.281379699707) - bv | POINT(3.35744155625 -54.4215) - bw | POINT(23.5150556564331 -23.4839134216309) - by | POINT(26.7725925445557 53.1588516235352) - bz | POINT(-88.6348991394043 16.3395160487277) - ca | POINT(-107.74817276001 67.1261215209961) - cc | POINT(96.8442066294247 -12.0173443) - cd | POINT(24.0954418182373 -1.67713665962219) - cf | POINT(22.5870132446289 5.98438787460327) - cg | POINT(15.7887516021729 0.403886616230011) - ch | POINT(7.65705513954163 46.5744686126709) - ci | POINT(-6.31190967559814 6.6278383731842) - ck | POINT(-159.778351359569 -21.23349585) - cl | POINT(-70.4179039001465 -53.7718944549561) - cm | POINT(13.260226726532 5.94519567489624) - cn | POINT(96.4428558349609 38.0426063537598) - co | POINT(-72.5295104980469 2.45174860954285) - cr | POINT(-83.8331413269043 9.935142993927) - cu | POINT(-80.8167381286621 21.8885278701782) - cv | POINT(-24.508106575 14.929) - cw | POINT(-68.9640918594077 12.1845) - cx | POINT(105.624119513558 -10.48417) - cy | POINT(32.959223486499 35.37010195) - cz | POINT(16.3209805488586 49.5069274902344) - de | POINT(9.30716800689697 50.2128944396973) - dj | POINT(42.969040422876 11.41542855) - dk | POINT(9.18490123748779 55.9891662597656) - dm | POINT(-61.0035801928854 15.6547055) - do | POINT(-69.6285591125488 18.5884169089722) - dz | POINT(4.24749487638474 25.797215461731) - ec | POINT(-77.4583168029785 -0.982844322919846) - ee | POINT(23.9428863525391 58.439525604248) - eg | POINT(28.952935218811 28.1771860122681) - eh | POINT(-13.6903142929077 25.0124177932739) - er | POINT(39.0122375488281 14.960337638855) - es | POINT(-2.59110307693481 38.7935485839844) - et | POINT(38.6169757843018 7.71399855613708) - fi | POINT(26.8979873657227 63.5619449615479) - fj | POINT(177.918533325195 -17.7423753738403) - fk | POINT(-58.9904479980469 -51.3450936007813) - fm | POINT(151.9535889125 8.5045) - fo | POINT(-6.60483694084778 62.10000995) - fr | POINT(0.284105718135834 47.5104522705078) - ga | POINT(10.8107047080994 -0.0742915570735931) - gb | POINT(-0.928231082856655 52.0161876678467) - gd | POINT(-61.6452430375 12.191) - ge | POINT(44.1666488647461 42.0038585662842) - gf | POINT(-53.4652481079102 3.56188893318176) - gg | POINT(-2.50580395030125 49.5854381) - gh | POINT(-0.463488027453423 7.16051578521729) - gi | POINT(-5.32053155848457 36.1106663) - gl | POINT(-33.8551120758057 74.6635551452637) - gm | POINT(-16.4096023535368 13.25) - gn | POINT(-13.839409828186 10.9629158973694) - gp | POINT(-61.6871265247053 16.23049055) - gq | POINT(10.2397356033325 1.43119311332703) - gr | POINT(23.1785039901733 39.0620670318604) - gs | POINT(-36.4943086948773 -54.4306784) - gt | POINT(-90.7436828613281 15.2042865753174) - gu | POINT(144.733626445767 13.444138) - gw | POINT(-14.8352527618408 11.9248690605164) - gy | POINT(-58.4516773223877 5.73698806762695) - hk | POINT(114.18577775 22.3492361) - hm | POINT(73.6823082266602 -53.22105985) - hn | POINT(-86.9541435241699 15.2382001876831) - hr | POINT(17.499662399292 45.5268955230713) - ht | POINT(-73.5192565917969 18.3249206691162) - hu | POINT(20.3536291122437 47.5172100067139) - id | POINT(123.345050811768 -0.837919592857361) - ie | POINT(-9.00520038604736 52.8772506713867) - il | POINT(35.4631499949707 32.86165655) - im | POINT(-4.86740773691101 54.023) - in | POINT(88.6762087020508 27.86155515) - io | POINT(71.4274391359073 -6.14349685) - iq | POINT(42.5810985565186 34.2610359191895) - ir | POINT(56.0935573577881 30.4675178527832) - is | POINT(-17.5178508758545 64.7168769836426) - it | POINT(10.4263944625854 44.8790493011475) - je | POINT(-2.19261599848299 49.1245833) - jm | POINT(-76.8402003547852 18.3935) - jo | POINT(36.5555210113525 30.7574186325073) - jp | POINT(138.725311279297 35.9209995269775) - ke | POINT(36.9060287475586 1.08512867614627) - kg | POINT(76.1557197570801 41.6649742126465) - kh | POINT(104.319019317627 12.9555516242981) - ki | POINT(173.633537933333 0.139) - km | POINT(44.3147485207764 -12.241) - kn | POINT(-62.6937987175 17.2555) - kp | POINT(126.655757904053 39.6457576751709) - kr | POINT(127.277404785156 36.4138870239258) - kw | POINT(47.3068407840576 29.6918055) - ky | POINT(-81.0745526670982 19.2994923579778) - kz | POINT(72.008113861084 49.8885555267334) - la | POINT(102.443916320801 19.8160953521729) - lb | POINT(35.4846443715483 33.4176673878926) - lc | POINT(-60.978944125 13.891) - li | POINT(9.54693948514429 47.15934115) - lk | POINT(80.3852043151855 8.41649961471558) - lr | POINT(-11.169605255127 4.04122126102448) - ls | POINT(28.6698419546997 -29.9453849) - lt | POINT(24.5173501968384 55.4929389953613) - lu | POINT(6.08649672997471 49.81533445) - lv | POINT(23.5103368759155 56.6714401245117) - ly | POINT(15.3684158325195 28.1217727661133) - ma | POINT(-4.0306156873703 33.2169628143311) - mc | POINT(7.47743150426578 43.62917385) - md | POINT(29.6172503477783 46.6651745) - me | POINT(19.7229134314941 43.02441345) - mf | POINT(-63.0666651534257 18.0810209) - mg | POINT(45.8637886047363 -20.5024528503418) - mh | POINT(171.949820566667 5.983) - mk | POINT(21.421085357666 41.0898007597656) - ml | POINT(-1.93310506641865 16.4699301719666) - mm | POINT(95.5462455749512 21.0962018966675) - mn | POINT(99.8113822937012 48.1861572265625) - mo | POINT(113.564416766761 22.16209625) - mp | POINT(145.213452483189 14.1490205) - mq | POINT(-60.8112834227783 14.43706925) - mr | POINT(-9.42324566841125 22.5925149917603) - ms | POINT(-62.1945521583333 16.745) - mt | POINT(14.3836306158583 35.9446731) - mu | POINT(57.551211475 -20.41) - mv | POINT(73.3929214477539 4.19375014305115) - mw | POINT(33.9572296142578 -12.2821822166443) - mx | POINT(-105.892219543457 25.8682699203491) - my | POINT(112.711540222168 2.10098683834076) - mz | POINT(37.5868968963623 -13.7268223762512) - na | POINT(16.6856970787048 -21.4657220840454) - nc | POINT(164.953224182129 -20.3888988494873) - ne | POINT(10.060417175293 19.0827360153198) - nf | POINT(167.95718166875 -29.0645) - ng | POINT(10.1778125762939 10.1780409812927) - ni | POINT(-85.8797492980957 13.2171587944031) - nl | POINT(-68.5706209441406 12.041) - no | POINT(23.1155624389648 70.0993499755859) - np | POINT(83.3625984191895 28.1310758590698) - nr | POINT(166.934792270833 -0.5275) - nu | POINT(-169.848737911905 -19.05305275) - nz | POINT(167.972099304199 -45.1305675506592) - om | POINT(56.8605518341064 20.4741315841675) - pa | POINT(-79.4016036987305 8.80656003952026) - pe | POINT(-78.6654052734375 -7.54711985588074) - pf | POINT(-145.057191213086 -16.7086236) - pg | POINT(146.646003723145 -7.37427568435669) - ph | POINT(121.483592987061 15.0996527671814) - pk | POINT(72.1134796142578 31.1462965011597) - pl | POINT(17.8813629150391 52.771821975708) - pm | POINT(-56.1951589074841 46.7832469) - pn | POINT(-130.106425528029 -25.0695595) - pr | POINT(-65.8875553967285 18.3716905) - ps | POINT(35.3980153741943 32.24773475) - pt | POINT(-8.45743942260742 40.1115436553955) - pw | POINT(134.496454875 7.3245) - py | POINT(-59.5178718566895 -22.4128150939941) - qa | POINT(51.4990362304443 24.9981677) - re | POINT(55.7734550547607 -21.3638828) - ro | POINT(26.3763284683228 45.3612003326416) - rs | POINT(20.4037199020386 44.5641384124756) - ru | POINT(116.440608978271 59.0678024291992) - rw | POINT(29.5788261333252 -1.6240443) - sa | POINT(47.7316932678223 22.4379062652588) - sb | POINT(164.638946533203 -10.2360653877258) - sc | POINT(46.3656697 -9.454) - sd | POINT(28.1472072601318 14.5642309188843) - se | POINT(15.6866798400879 60.3556804656982) - sg | POINT(103.84187219299 1.304) - sh | POINT(-12.2815573611979 -37.11546755) - si | POINT(14.0473856628607 46.390855) - sj | POINT(15.2755260467529 79.2336540222168) - sk | POINT(20.416033744812 48.869701385498) - sl | POINT(-11.4777312278748 8.78156280517578) - sm | POINT(12.4606268797657 43.9427969) - sn | POINT(-15.3711128234863 14.9947791099548) - so | POINT(46.9338359832764 9.34094429016113) - sr | POINT(-55.4286479949951 4.5698549747467) - ss | POINT(28.1357345581055 8.50933408737183) - st | POINT(6.61025854583333 0.2215) - sv | POINT(-89.3666543301004 13.4307287) - sx | POINT(-63.1539330807882 17.9345) - sy | POINT(38.1551322937012 35.3422107696533) - sz | POINT(31.782634398523 -26.14244365) - tc | POINT(-71.325541342334 21.35) - td | POINT(17.4209251403809 13.4622311592102) - tf | POINT(137.5 -67.5) - tg | POINT(1.0698350071907 7.87677597999573) - th | POINT(102.008777618408 16.4231028556824) - tj | POINT(71.9134941101074 39.0152739312988) - tk | POINT(-171.826039878679 -9.209903) - tl | POINT(126.225208282471 -8.72636747360229) - tm | POINT(57.7160358428955 39.9253444671631) - tn | POINT(9.04958724975586 34.8419933319092) - to | POINT(-176.993202209473 -23.1110429763794) - tr | POINT(32.8200283050537 39.8635063171387) - tt | POINT(-60.70793924375 11.1385) - tv | POINT(178.774993896484 -9.41685771942139) - tw | POINT(120.300746917725 23.1700229644775) - tz | POINT(33.5389289855957 -5.01840615272522) - ua | POINT(33.4433536529541 49.3061904907227) - ug | POINT(32.9652328491211 2.08584922552109) - um | POINT(-169.509930872296 16.74605815) - us | POINT(-116.395355224609 40.7137908935547) - uy | POINT(-56.4650554656982 -33.6265888214111) - uz | POINT(61.3552989959717 42.9610729217529) - va | POINT(12.3319785703086 42.0493197) - vc | POINT(-61.0990541737305 13.316) - ve | POINT(-64.8832321166992 7.69849991798401) - vg | POINT(-64.6247911940199 18.419) - vi | POINT(-64.8895090795187 18.3226325) - vn | POINT(104.201791331787 10.27644235) - vu | POINT(167.319198608398 -15.8868751525879) - wf | POINT(-176.207816222208 -13.28535775) - ws | POINT(-172.109667323427 -13.850938) - ye | POINT(45.945629119873 16.1633830070496) - yt | POINT(44.9377459760742 -12.6088246) - za | POINT(23.1948881149292 -30.4327602386475) - zm | POINT(26.3861808776855 -14.3996663093567) - zw | POINT(30.1241998672485 -19.8690795898438) - diff --git a/test/scenes/data/parallel-road.wkt b/test/scenes/data/parallel-road.wkt deleted file mode 100644 index 355af300..00000000 --- a/test/scenes/data/parallel-road.wkt +++ /dev/null @@ -1,5 +0,0 @@ -n-middle-w | POINT(1.0065316 2.0003381) -n-middle-e | POINT(1.007236 2.0003408) -w-south | LINESTRING(1.0065324 2.0001892,1.006676 2.0002786,1.0068195 2.0002786,1.0069171 2.0002515,1.0070417 2.0001892,1.0072422 2.000173) -w-middle | LINESTRING(1.0065316 2.0003381,1.006686 2.0004248,1.0069 2.0004167,1.007236 2.0003408) -w-north | LINESTRING(1.0065397 2.000418,1.0066833 2.0005074,1.0068269 2.0005074,1.0069244 2.0004803,1.007049 2.000418,1.0072495 2.0004018) diff --git a/test/scenes/data/points-on-roads.wkt b/test/scenes/data/points-on-roads.wkt deleted file mode 100644 index 17990dce..00000000 --- a/test/scenes/data/points-on-roads.wkt +++ /dev/null @@ -1,8 +0,0 @@ -n-N-unglued | POINT(1.004922 2.0005155) -n-S-unglued | POINT(1.0046259 2.0002949) -n-NE | POINT(1.0050661 2.0006118) -n-SE | POINT(1.0051339 2.0003349) -n-NW | POINT(1.0047583 2.0004087) -n-SW | POINT(1.0047275 2.0003564) -w-north | LINESTRING(1.0044996 2.0004302,1.0046259 2.0003841,1.0047583 2.0004087,1.004922 2.0005155,1.0050661 2.0006118,1.0053155 2.0006241) -w-south | LINESTRING(1.0045243 2.0002241,1.0046259 2.0002949,1.0047275 2.0003564,1.004826 2.0002918,1.0049368 2.0002641,1.0051339 2.0003349,1.0053278 2.0003687) diff --git a/test/scenes/data/poly-area.wkt b/test/scenes/data/poly-area.wkt deleted file mode 100644 index e65f2054..00000000 --- a/test/scenes/data/poly-area.wkt +++ /dev/null @@ -1,11 +0,0 @@ -0.0001 | MULTIPOLYGON(((0 0,0.001 0,0.001 0.1,0 0.1,0 0))) -0.0005 | MULTIPOLYGON(((0 0,0.005 0,0.005 0.1,0 0.1,0 0))) -0.001 | MULTIPOLYGON(((0 0,0.01 0,0.01 0.1,0 0.1,0 0))) -0.005 | MULTIPOLYGON(((0 0,0.05 0,0.05 0.1,0 0.1,0 0))) -0.01 | MULTIPOLYGON(((0 0,0.1 0,0.1 0.1,0 0.1,0 0))) -0.05 | MULTIPOLYGON(((0 0,0.5 0,0.5 0.1,0 0.1,0 0))) -0.1 | MULTIPOLYGON(((0 0,0.1 0,0.1 1,0 1,0 0))) -0.5 | MULTIPOLYGON(((0 0,0.5 0,0.5 1,0 1,0 0))) -1.0 | MULTIPOLYGON(((0 0,1 0,1 1,0 1,0 0))) -2.0 | MULTIPOLYGON(((0 0,2 0,2 1,0 1,0 0))) -5.0 | MULTIPOLYGON(((0 0,5 0,5 1,0 1,0 0))) diff --git a/test/scenes/data/poly-areas.osm b/test/scenes/data/poly-areas.osm deleted file mode 100644 index c6f62770..00000000 --- a/test/scenes/data/poly-areas.osm +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/scenes/data/road-with-alley.wkt b/test/scenes/data/road-with-alley.wkt deleted file mode 100644 index 100b3733..00000000 --- a/test/scenes/data/road-with-alley.wkt +++ /dev/null @@ -1,6 +0,0 @@ -n-main-east | POINT(1.0024481 2.0003542) -n-main-west | POINT(1.001552 2.0002662) -n-alley | POINT(1.0019235 2.0005463) -n-corner | POINT(1.0019235 2.0003542) -w-alley | LINESTRING(1.0019594 2.0003086,1.0019594 2.0005756) -w-main | LINESTRING(1.0013435 2.0003118,1.0016759 2.0003053,1.0019594 2.0003086,1.0021255 2.0003151,1.0023699 2.0003118,1.0026078 2.0002988) diff --git a/test/scenes/data/roads-with-pois.wkt b/test/scenes/data/roads-with-pois.wkt deleted file mode 100644 index d4addbb8..00000000 --- a/test/scenes/data/roads-with-pois.wkt +++ /dev/null @@ -1,6 +0,0 @@ -p-N2 | POINT(1.0003904 2.0003399) -p-S1 | POINT(1.0008104 2.0002927) -p-N1 | POINT(1.0005321 2.0005288) -p-S2 | POINT(1.0006398 2.0001064) -w-north | LINESTRING(1.0001174 2.0004055,1.0004298 2.0003976,1.0006608 2.0004579,1.0010624 2.0005419) -w-south | LINESTRING(1.0001384 2.0001903,1.0007212 2.0001982,1.0010677 2.0002192) diff --git a/test/scenes/data/roads.osm b/test/scenes/data/roads.osm deleted file mode 100644 index b7614f78..00000000 --- a/test/scenes/data/roads.osm +++ /dev/null @@ -1,405 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/scenes/data/split-road.wkt b/test/scenes/data/split-road.wkt deleted file mode 100644 index 4435a131..00000000 --- a/test/scenes/data/split-road.wkt +++ /dev/null @@ -1,6 +0,0 @@ -w-5 | LINESTRING(1.0056855 2.0005616,1.0056087 2.0005669,1.0055106 2.0005245) -w-4a | LINESTRING(1.0062843 2.0005139,1.0061359 2.0004954,1.0060538 2.0005113,1.0059107 2.000506,1.0057358 2.0005007,1.0056855 2.0005616) -w-3 | LINESTRING(1.0061995 2.0003391,1.0062816 2.0002624,1.0063585 2.0002968,1.0063717 2.0004715,1.0062843 2.0005139) -w-2 | LINESTRING(1.0057941 2.0002809,1.0058869 2.0003259,1.0060034 2.0003497,1.0061041 2.0003577,1.0061995 2.0003391) -w-4b | LINESTRING(1.0062843 2.0005139,1.0061306 2.0005324,1.0060511 2.000543,1.0058975 2.000543,1.0057491 2.0005351,1.0056855 2.0005616) -w-1 | LINESTRING(1.0054709 2.0003603,1.0056352 2.0002782,1.0057941 2.0002809) diff --git a/test/scenes/data/way-area-with-center.wkt b/test/scenes/data/way-area-with-center.wkt deleted file mode 100644 index ed34cd3b..00000000 --- a/test/scenes/data/way-area-with-center.wkt +++ /dev/null @@ -1,5 +0,0 @@ -inner-S | POINT(0.0048516 -0.0095176) -inner-N | POINT(0.0018846 -0.0023652) -outer-C | POINT(0.0041244 -0.0060007) -inner-C | POINT(0.0035625 -0.0066188) -area | MULTIPOLYGON(((0.0005071 -0.0060738,0.0010369 -0.0072924,0.0019376 -0.0065507,0.0026264 -0.0080341,0.0026264 -0.0091997,0.0022025 -0.0099944,0.0026794 -0.0105772,0.0038979 -0.0109481,0.0065469 -0.0099414,0.0077125 -0.0066566,0.0068648 -0.0049612,0.0061231 -0.0064977,0.0051694 -0.0076633,0.0033681 -0.0059149,0.0075006 -0.0040076,0.006441 -0.0025771,0.0050105 -0.0021533,0.0013019 -0.0015175,0.0005601 -0.0025771,0.0005071 -0.0042195,0.0017787 -0.00565,0.0005071 -0.0060738)))