[postgis-tickets] [SCM] PostGIS branch main updated. 3.1.0rc1-308-g63b1ea1

git at osgeo.org git at osgeo.org
Mon Jul 12 12:22:19 PDT 2021


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".

The branch, main has been updated
       via  63b1ea1a04a1bc14cfeeeb3b51a0e3f9b9b90c7b (commit)
      from  30aeed6904b3b74eb26c5c4cf01e0e9c53a2b3fb (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 63b1ea1a04a1bc14cfeeeb3b51a0e3f9b9b90c7b
Author: Sandro Santilli <strk at kbt.io>
Date:   Mon Jul 12 21:21:38 2021 +0200

    Further improve hole coverage speed by only comparing an hole point
    
    References #4946

diff --git a/topology/sql/manage/ValidateTopology.sql.in b/topology/sql/manage/ValidateTopology.sql.in
index abea5e0..3cb27c6 100644
--- a/topology/sql/manage/ValidateTopology.sql.in
+++ b/topology/sql/manage/ValidateTopology.sql.in
@@ -270,7 +270,8 @@ BEGIN
 
   CREATE TEMP TABLE hole_check (
     ring_id int,
-    hole geometry, -- linestring
+    hole_mbr geometry, -- point
+    hole_point geometry, -- point
     in_shell int
   );
 
@@ -424,7 +425,14 @@ BEGIN
         -- NOTE: multiple CW rings (holes) can exist for a given face
           INSERT INTO hole_check VALUES (
             nextEdge,
-            rec.ring_geom,
+            ST_Envelope(rec.ring_geom),
+            ST_PointN(rec.ring_geom, 1),
+            -- NOTE: we don't incurr in the risk
+            --       of a ring touching the shell
+            --       because in those cases the
+            --       intruding "hole" will not really
+            --       be considered an hole as its ring
+            --       will not be CW
             rec.side_faces[1]
           );
           found_holes := found_holes + 1;
@@ -854,8 +862,8 @@ BEGIN
   LOOP --{
     SELECT f.face_id
     FROM face_check f
-    WHERE rec.hole @ f.shell
-    AND _ST_Contains(f.shell, rec.hole)
+    WHERE rec.hole_mbr @ f.shell
+    AND _ST_Contains(f.shell, rec.hole_point)
     ORDER BY ST_Area(f.shell) ASC
     LIMIT 1
     INTO rec2;

-----------------------------------------------------------------------

Summary of changes:
 topology/sql/manage/ValidateTopology.sql.in | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list