[postgis-tickets] [SCM] PostGIS branch master updated. 3.4.0rc1-626-g9288c549c

git at osgeo.org git at osgeo.org
Mon Sep 25 03:56:52 PDT 2023


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, master has been updated
       via  9288c549c18130afa0551372877eb366c1a2e279 (commit)
      from  c34f64d61de01dfbb2e817e6e225d4b560a3c919 (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 9288c549c18130afa0551372877eb366c1a2e279
Author: Sandro Santilli <strk at kbt.io>
Date:   Mon Sep 25 12:47:52 2023 +0200

    Fix box-filtered validity check of topologies with edge-less faces
    
    Includes regress test.
    References #5548 in master branch (3.5.0dev)

diff --git a/topology/sql/manage/ValidateTopology.sql.in b/topology/sql/manage/ValidateTopology.sql.in
index a644dd5ca..3375fb006 100644
--- a/topology/sql/manage/ValidateTopology.sql.in
+++ b/topology/sql/manage/ValidateTopology.sql.in
@@ -882,6 +882,7 @@ BEGIN
     )
     AND e.edge_id IS NULL
   LOOP --{
+    invalid_faces := array_append(invalid_faces, rec.id1);
     retrec.error = 'face without edges';
     retrec.id1 = rec.id1;
     retrec.id2 = NULL;
diff --git a/topology/test/regress/validatetopology.sql b/topology/test/regress/validatetopology.sql
index 2aab5e6b6..8a23aed2e 100644
--- a/topology/test/regress/validatetopology.sql
+++ b/topology/test/regress/validatetopology.sql
@@ -195,5 +195,16 @@ SELECT '#5403.1', * FROM topology.ValidateTopology(
 );
 ROLLBACK;
 
+-- See https://trac.osgeo.org/postgis/ticket/5548
+BEGIN;
+SELECT NULL FROM topology.CreateTopology('t5548');
+SELECT '#5548.0', topology.TopoGeo_addPolygon('t5548',
+  'POLYGON((0 0, 5 10, 10 0,0 0))');
+DELETE FROM t5548.edge;
+DELETE FROM t5548.node;
+SELECT '#5548.1', * FROM topology.ValidateTopology('t5548',
+  ST_MakeEnvelope(2,2,4,4));
+ROLLBACK;
+
 SELECT NULL FROM topology.DropTopology('city_data');
 
diff --git a/topology/test/regress/validatetopology_expected b/topology/test/regress/validatetopology_expected
index b0c954fee..82242d0a4 100644
--- a/topology/test/regress/validatetopology_expected
+++ b/topology/test/regress/validatetopology_expected
@@ -38,3 +38,5 @@
 #5105.edges_count|2
 #5105.faces_count|0
 #5403.0|1
+#5548.0|1
+#5548.1|face without edges|1|

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

Summary of changes:
 topology/sql/manage/ValidateTopology.sql.in     |  1 +
 topology/test/regress/validatetopology.sql      | 11 +++++++++++
 topology/test/regress/validatetopology_expected |  2 ++
 3 files changed, 14 insertions(+)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list