]> git.openstreetmap.org Git - nominatim.git/commitdiff
Merge pull request #3178 from lonvia/library-documentation
authorSarah Hoffmann <lonvia@denofr.de>
Wed, 30 Aug 2023 07:17:24 +0000 (09:17 +0200)
committerGitHub <noreply@github.com>
Wed, 30 Aug 2023 07:17:24 +0000 (09:17 +0200)
Update documentation for new Python frontend

lib-sql/functions/place_triggers.sql
test/bdd/osm2pgsql/update/tags.feature

index 6a52021bb02d40f2a83ce4e71e88f0185b4efe41..3def65960215ddc3b72db2e7f52dfc1d45affd34 100644 (file)
@@ -37,7 +37,7 @@ BEGIN
   -- Remove the place from the list of places to be deleted
   DELETE FROM place_to_be_deleted pdel
     WHERE pdel.osm_type = NEW.osm_type and pdel.osm_id = NEW.osm_id
-          and pdel.class = NEW.class;
+          and pdel.class = NEW.class and pdel.type = NEW.type;
 
   -- Have we already done this place?
   SELECT * INTO existing
index 3d0830405082fc9d6087e747da4813a41355e173..e2fd665aa34799517536dc669124aec70aa6e5b6 100644 (file)
@@ -488,3 +488,26 @@ Feature: Tag evaluation
         Then placex contains exactly
           | object       | type     | admin_level |
           | R10:boundary | informal | 4           |
+
+
+    Scenario: Main tag and geometry is changed
+        When loading osm data
+          """
+          n1 x40 y40
+          n2 x40.0001 y40
+          n3 x40.0001 y40.0001
+          n4 x40 y40.0001
+          w5 Tbuilding=house,name=Foo Nn1,n2,n3,n4,n1
+          """
+        Then place contains exactly
+          | object      | type  |
+          | W5:building | house |
+
+        When updating osm data
+          """
+          n1 x39.999 y40
+          w5 Tbuilding=terrace,name=Bar Nn1,n2,n3,n4,n1
+          """
+        Then place contains exactly
+          | object      | type    |
+          | W5:building | terrace |