]> git.openstreetmap.org Git - nominatim.git/blobdiff - tests/features/db/update/interpolation.feature
Merge pull request #219 from mizabrik/master
[nominatim.git] / tests / features / db / update / interpolation.feature
index 4075ba47b531a1392b4e3a4c75aa55c1aa88eec6..66367b108156523cfade47d8b5013610f93cf861 100644 (file)
@@ -37,7 +37,6 @@ Feature: Update of address interpolations
           | object | parent_place_id | startnumber | endnumber
           | W10    | W3              | 2           | 6
 
-    @Fail
     Scenario: addr:street added to housenumbers
       Given the scene parallel-road
       And the place nodes
@@ -174,3 +173,86 @@ Feature: Update of address interpolations
       And table location_property_osmline contains
           | object | parent_place_id | startnumber | endnumber
           | W10    | W2              | 2           | 6
+
+    Scenario: building becomes interpolation
+      Given the scene building-with-parallel-streets
+      And the place ways
+          | osm_id | class    | type  | housenumber | geometry
+          | 1      | place    | house | 3           | :w-building
+      And the place ways
+          | osm_id | class   | type         | name                    | geometry
+          | 2      | highway | unclassified | 'name' : 'Cloud Street' | :w-south
+      When importing
+      Then table placex contains
+          | object | parent_place_id
+          | W1     | W2
+      When updating place nodes
+          | osm_id | class | type  | housenumber | geometry
+          | 1      | place | house | 2           | :n-north-w
+          | 2      | place | house | 6           | :n-north-e
+      And the ways
+          | id  | nodes
+          | 1   | 1,100,101,102,2
+      And updating place ways
+          | osm_id | class   | type    | housenumber | street      | geometry
+          | 1      | place   | houses  | even        | Cloud Street| :w-north
+      Then table placex has no entry for W1
+      And table location_property_osmline contains
+          | object | parent_place_id | startnumber | endnumber
+          | W1     | W2              | 2           | 6
+
+
+
+    Scenario: interpolation becomes building
+      Given the scene building-with-parallel-streets
+      And the place nodes
+          | osm_id | class | type  | housenumber | geometry
+          | 1      | place | house | 2           | :n-north-w
+          | 2      | place | house | 6           | :n-north-e
+      And the place ways
+          | osm_id | class   | type         | name                    | geometry
+          | 2      | highway | unclassified | 'name' : 'Cloud Street' | :w-south
+      And the ways
+          | id  | nodes
+          | 1   | 1,100,101,102,2
+      And the place ways
+          | osm_id | class   | type    | housenumber | street      | geometry
+          | 1      | place   | houses  | even        | Cloud Street| :w-north
+      When importing
+      Then table placex has no entry for W1
+      And table location_property_osmline contains
+          | object | parent_place_id | startnumber | endnumber
+          | W1     | W2              | 2           | 6
+      When updating place ways
+          | osm_id | class    | type  | housenumber | geometry
+          | 1      | place    | house | 3           | :w-building
+      Then table placex contains
+          | object | parent_place_id
+          | W1     | W2
+
+    Scenario: housenumbers added to interpolation
+      Given the scene building-with-parallel-streets
+      And the place ways
+          | osm_id | class   | type         | name                    | geometry
+          | 2      | highway | unclassified | 'name' : 'Cloud Street' | :w-south
+      And the ways
+          | id  | nodes
+          | 1   | 1,100,101,102,2
+      And the place ways
+          | osm_id | class   | type    | housenumber | geometry
+          | 1      | place   | houses  | even        | :w-north
+      When importing
+      Then table location_property_osmline has no entry for W1
+      When updating place nodes
+          | osm_id | class | type  | housenumber | geometry
+          | 1      | place | house | 2           | :n-north-w
+          | 2      | place | house | 6           | :n-north-e
+      And updating place ways
+          | osm_id | class   | type    | housenumber | street      | geometry
+          | 1      | place   | houses  | even        | Cloud Street| :w-north
+      Then table location_property_osmline contains
+          | object | parent_place_id | startnumber | endnumber
+          | W1     | W2              | 2           | 6
+
+
+