]> git.openstreetmap.org Git - nominatim.git/blobdiff - test/bdd/db/import/linking.feature
add support for new middle table format of osm2pgsql
[nominatim.git] / test / bdd / db / import / linking.feature
index 0fb3f76dbb2365d429c2a6ab275d6b22386925b0..5bfdbca78b102a437d19e94a110fc8798549704f 100644 (file)
@@ -55,8 +55,8 @@ Feature: Linking of places
          | R23    | -   |
         When sending search query "rhein"
         Then results contain
-         | osm_type |
-         | R |
+         | osm |
+         | R13 |
 
     Scenario: Relations are not linked when in waterway relations
         Given the grid
@@ -81,9 +81,9 @@ Feature: Linking of places
          | R2     | - |
         When sending search query "rhein"
         Then results contain
-          | ID | osm_type |
-          |  0 | R |
-          |  1 | W |
+          | ID | osm |
+          |  0 | R |
+          |  1 | W |
 
 
     Scenario: Empty waterway relations are handled correctly
@@ -138,8 +138,8 @@ Feature: Linking of places
          | W2     | R1 |
         When sending search query "rhein2"
         Then results contain
-         | osm_type |
-         | W |
+         | osm |
+         | W |
 
     # github #573
     Scenario: Boundaries should only be linked to places
@@ -205,14 +205,14 @@ Feature: Linking of places
          | city |
          | Berlin |
         Then results contain
-          | ID | osm_type | osm_id |
-          |  0 | R | 13 |
+          | ID | osm |
+          |  0 | R13 |
         When sending search query ""
          | state |
          | Berlin |
         Then results contain
-          | ID | osm_type | osm_id |
-          |  0 | R | 13 |
+          | ID | osm |
+          |  0 | R13 |
 
 
     Scenario: Boundaries without place tags only link against same admin level
@@ -237,14 +237,14 @@ Feature: Linking of places
          | state |
          | Berlin |
         Then results contain
-          | ID | osm_type | osm_id |
-          |  0 | R | 13 |
+          | ID | osm |
+          |  0 | R13 |
         When sending search query ""
          | city |
          | Berlin |
         Then results contain
-          | ID | osm_type | osm_id |
-          |  0 | N | 2 |
+          | ID | osm |
+          |  0 | N |
 
     # github #1352
     Scenario: Do not use linked centroid when it is outside the area
@@ -290,3 +290,23 @@ Feature: Linking of places
          | R1     | 'linked_place' : 'city', 'wikidata': 'Q1234'  |
          | R2     | 'wikidata': 'Q1234'                     |
 
+
+    Scenario: Boundaries without names inherit names from linked places
+        Given the 0.05 grid
+         | 1 |   | 2 |
+         |   | 9 |   |
+         | 4 |   | 3 |
+        Given the places
+         | osm | class    | type           | extra+wikidata | admin | geometry    |
+         | R1  | boundary | administrative | 34             | 8     | (1,2,3,4,1) |
+        And the places
+         | osm | class    | type           | name+name  |
+         | N9  | place    | city           | LabelPlace |
+        And the relations
+         | id | members  |
+         | 1  | N9:label |
+        When importing
+        Then placex contains
+         | object     | name+_place_name  |
+         | R1         | LabelPlace |
+