[SCM] PostGIS branch stable-3.6 updated. 3.6.4-142-geffa73b6f

git at osgeo.org git at osgeo.org
Thu Sep 3 10:57:45 PDT 2026


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, stable-3.6 has been updated
       via  effa73b6fe547c182f66b9f143029a20db4acaf0 (commit)
      from  6a8b5a8ce8939ef68878f4f9f98e846fd99081de (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 effa73b6fe547c182f66b9f143029a20db4acaf0
Author: Sandro Santilli <strk at kbt.io>
Date:   Wed Sep 2 19:46:42 2026 +0200

    Restore edge collapse handling in topology population function
    
    The topology code used lwgeom_make_valid to handle line collapses, but
    that function apparently changed semantic (see #6123 comment 2).
    
    Includes regress test
    
    References #6120 in 3.6 branch (3.6.5dev)

diff --git a/NEWS b/NEWS
index 79dee3010..727d61763 100644
--- a/NEWS
+++ b/NEWS
@@ -1,13 +1,15 @@
-PostGIS 3.6.5
+PostGIS 3.6.5dev
 2026/xx/xx
 
 * Fixes *
 
- - GT-675, Preserve TRIANGLE children while normalizing malformed TINs
-   (Darafei Praliaskouski)
- - #6038, Avoid stale geometry_columns relation lookups after relations are
-   dropped or SELECT privilege is revoked (Darafei Praliaskouski)
- - Stop the extension upgrade script running ANALYZE inside its transaction,
+- #6120, Improve topology robustness by restoring edge collapse handling
+         during building (Sandro Santilli)
+- GT-675, Preserve TRIANGLE children while normalizing malformed TINs
+          (Darafei Praliaskouski)
+- #6038, Avoid stale geometry_columns relation lookups after relations are
+         dropped or SELECT privilege is revoked (Darafei Praliaskouski)
+- Stop the extension upgrade script running ANALYZE inside its transaction,
   where it can deadlock with autovacuum (Darafei Praliaskouski)
 - OSSFuzz 5877056525893632, reject truncated encoded polyline input
   (Darafei Praliaskouski)
diff --git a/liblwgeom/topo/lwgeom_topo.c b/liblwgeom/topo/lwgeom_topo.c
index 9050e100d..893b3cce3 100644
--- a/liblwgeom/topo/lwgeom_topo.c
+++ b/liblwgeom/topo/lwgeom_topo.c
@@ -6973,12 +6973,12 @@ _lwt_AddLineEdge( LWT_TOPOLOGY* topo, LWLINE* edge, double tol,
 
     if ( nn ) _lwt_release_nodes(node, nn);
 
-    LWDEBUGG(2, lwline_as_lwgeom(edge), "Snapped after drifted endpoints snap");
+    LWDEBUGG(1, lwline_as_lwgeom(edge), "Snapped after drifted endpoints snap");
 
-    /* make valid, after snap (to handle collapses) */
-    tmp = lwgeom_make_valid(lwline_as_lwgeom(edge));
+    /* node after snap (to handle collapses) */
+    tmp = lwgeom_node(lwline_as_lwgeom(edge));
 
-    LWDEBUGG(2, tmp, "Made-valid after snap to drifted endpoints");
+    LWDEBUGG(1, tmp, "Noded after snap to drifted endpoints");
 
     col = lwgeom_as_lwcollection(tmp);
     if ( col )
diff --git a/topology/test/regress/topogeo_addlinestring.sql b/topology/test/regress/topogeo_addlinestring.sql
index 5573150ab..cb86ee076 100644
--- a/topology/test/regress/topogeo_addlinestring.sql
+++ b/topology/test/regress/topogeo_addlinestring.sql
@@ -556,3 +556,18 @@ SELECT NULL FROM topology.TopoGeo_addLinestring('t5782',
 );
 SELECT '#5782', 'valid_after', * FROM topology.ValidateTopology('t5782');
 ROLLBACK;
+
+-- See https://trac.osgeo.org/postgis/ticket/6120
+BEGIN;
+SELECT NULL FROM topology.CreateTopology( 't6120' );
+-- Start condition: single closed edge forming very tiny area
+-- TODO: create the starting condition with COPY instead?
+SELECT 't6120.start', topology.TopoGeo_addLinestring('t6120',
+  '01020000000500000010526CDB36DE34406BEE28A10F5451404313671D53DE34404E64FC3B1054514010526CDB36DE34406CEE28A10F545140169A989329DE3440E00C65580F54514010526CDB36DE34406BEE28A10F545140'
+,-1);
+
+-- Incoming: line very similar to the existing one, with just one vertex off by 5.038095382105394e-15
+SELECT 't6120.works', count(*) > 0 FROM topology.TopoGeo_addLinestring('t6120',
+  '0102000000050000004313671D53DE34404E64FC3B10545140169A989329DE3440E00C65580F54514010526CDB36DE34406BEE28A10F545140EBE8402451DE344060A52C31105451404313671D53DE34404E64FC3B10545140'
+,-1);
+ROLLBACK;
diff --git a/topology/test/regress/topogeo_addlinestring_expected b/topology/test/regress/topogeo_addlinestring_expected
index 2a2099d6a..43e770a39 100644
--- a/topology/test/regress/topogeo_addlinestring_expected
+++ b/topology/test/regress/topogeo_addlinestring_expected
@@ -224,3 +224,5 @@ b5234.0|1
 b5234.1|1
 t5568|invalidities at start|
 t5568|invalidities at end|
+t6120.start|1
+t6120.works|t

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

Summary of changes:
 NEWS                                                 | 14 ++++++++------
 liblwgeom/topo/lwgeom_topo.c                         |  8 ++++----
 topology/test/regress/topogeo_addlinestring.sql      | 15 +++++++++++++++
 topology/test/regress/topogeo_addlinestring_expected |  2 ++
 4 files changed, 29 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list