X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/5c8fbe8186ea0fa06b7c96f08e8afba1744492c1..74c39267d94b11258f60bd309813d47f291d938e:/test/bdd/db/import/parenting.feature diff --git a/test/bdd/db/import/parenting.feature b/test/bdd/db/import/parenting.feature index 87467fd2..c349b69f 100644 --- a/test/bdd/db/import/parenting.feature +++ b/test/bdd/db/import/parenting.feature @@ -3,42 +3,49 @@ 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 | | N1 | W1 | | N2 | W1 | - When searching for "4 galoo" + When sending search query "4 galoo" Then results contain - | ID | osm_type | osm_id | langaddress | - | 0 | N | 1 | 4, galoo, 12345 | - When searching for "5 galoo" + | ID | osm | display_name | + | 0 | N1 | 4, galoo, 12345, Deutschland | + When sending search query "5 galoo" Then results contain - | ID | osm_type | osm_id | langaddress | - | 0 | N | 2 | 5, galoo, 99999 | + | ID | osm | display_name | + | 0 | N2 | 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,70 @@ 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| + | N1 | place | house | south | + | N2 | place | house | north | + | N3 | place | house | south | + | N4 | place | house | north | 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 | name | geometry | + | W1 | highway | residential | north | 10,11 | + | W2 | highway | residential | south | 20,21 | + When importing + Then placex contains + | object | parent_place_id | + | N1 | W2 | + | N2 | W1 | + | N3 | W2 | + | N4 | W1 | + + @fail-legacy + Scenario: addr:street tag parents to appropriately named street, locale names + Given the grid + | 10 | | | | | 11 | + | | 1 | 2 | | | | + | | | | 3 | 4 | | + | 20 | | | | | 21 | + And the places + | 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 | north | :w-north | - | W2 | highway | residential | south | :w-south | + | W1 | highway | residential | Nord | 10,11 | + | W2 | highway | residential | Süd | 20,21 | + When importing + Then placex contains + | object | parent_place_id | + | N1 | W2 | + | N2 | W1 | + | N3 | W2 | + | N4 | W1 | + + Scenario: addr:street tag parents to appropriately named street with abbreviation + 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 | @@ -88,17 +154,21 @@ Feature: Parenting of objects | N4 | W1 | Scenario: addr:street tag parents to next named street - Given the scene roads-with-pois - 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 | + Given the grid + | 10 | | | | | 11 | + | | 1 | 2 | | | | + | | | | 3 | 4 | | + | 20 | | | | | 21 | + And the places + | 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 | @@ -108,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 | @@ -177,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 | @@ -198,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 | W3 | + | 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 | @@ -290,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 | @@ -309,20 +415,69 @@ 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 | + | 3 | | | 4 | + | | | | | + | | 9 | | | + | 5 | | | 6 | + And the places + | osm | class | type | housenr | geometry | + | N9 | place | house | 34 | 9 | + And the named places + | osm | class | type | name | geometry | + | R14 | highway | pedestrian | Right St | (1,2,4,3,1) | + | W14 | highway | pedestrian | Left St | 5,6 | + And the relations + | id | members | tags+type | + | 1 | N9:house,R14:street | associatedStreet | + When importing + Then placex contains + | object | parent_place_id | + | N9 | R14 | + + + Scenario: Choose closest street in associatedStreet relation + Given the grid + | 1 | | | | 3 | + | 10 | | 11 | | 12 | + And the places + | osm | class | type | housenr | geometry | + | N1 | place | house | 1 | 1 | + | N3 | place | house | 3 | 3 | + And the named places + | osm | class | type | geometry | + | W100 | highway | residential | 10,11 | + | W101 | highway | residential | 11,12 | + And the relations + | id | members | tags+type | + | 1 | N1:house,N3:house,W100:street,W101:street | associatedStreet | + When importing + Then placex contains + | object | parent_place_id | + | N1 | W100 | + | N3 | W101 | + + 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 | @@ -330,114 +485,169 @@ Feature: Parenting of objects | N1 | W3 | 3 | | N2 | W3 | 3 | | N3 | W3 | 3 | + When sending geocodejson search query "3, foo" with address + Then results contain + | housenumber | + | 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 | W2 | 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 + Given the grid + | 1 | | 2 | 5 | + | | | | | + | 3 | | | 4 | + | | 10| | | + And the places + | osm | class | type | name+name | geometry | + | W1 | highway | residential | Via Cavassico superiore | 1, 2 | + | W3 | highway | residential | Via Cavassico superiore | 2, 5 | + | W2 | highway | primary | Via Frazione Cavassico | 3, 4 | + And the named places + | osm | class | type | addr+street | + | N10 | shop | yes | Via Cavassico superiore | + When importing + Then placex contains + | object | parent_place_id | + | N10 | W1 | + + Scenario: place=square may be parented via addr:place + Given the grid + | | | 9 | | | + | | 5 | | 6 | | + | | 8 | | 7 | | + And the places + | osm | class | type | name+name | geometry | + | W2 | place | square | Foo pl | (5, 6, 7, 8, 5) | + And the places + | osm | class | type | name+name | housenr | addr_place | geometry | + | N10 | shop | grocery | le shop | 5 | Foo pl | 9 | + When importing + Then placex contains + | object | rank_address | + | W2 | 25 | + Then placex contains + | object | parent_place_id | + | N10 | W2 |