[SCM] PostGIS branch master updated. 3.7.0rc1-22-g5c6ed8fb7
git at osgeo.org
git at osgeo.org
Thu Sep 3 11:05:24 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, master has been updated
via 5c6ed8fb748983124d43acd7edde3d36c38abfa0 (commit)
from 2b099fa96792108d87dd419fa98eb5a92eb89979 (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 5c6ed8fb748983124d43acd7edde3d36c38abfa0
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 master branch (3.7.0dev)
diff --git a/liblwgeom/topo/lwgeom_topo.c b/liblwgeom/topo/lwgeom_topo.c
index 11fed9091..5f87eb282 100644
--- a/liblwgeom/topo/lwgeom_topo.c
+++ b/liblwgeom/topo/lwgeom_topo.c
@@ -7245,12 +7245,12 @@ _lwt_AddLineEdge(LWT_TOPOLOGY *topo,
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 1f67b7198..caef2a21f 100644
--- a/topology/test/regress/topogeo_addlinestring.sql
+++ b/topology/test/regress/topogeo_addlinestring.sql
@@ -686,3 +686,20 @@ SELECT 't6064.2', count(*) > 0 FROM topology.TopoGeo_addLinestring('t6064',
)');
SELECT 't6064.check.final', * FROM topology.ValidateTopology('t6064');
SELECT NULL FROM topology.DropTopology ('t6064');
+
+
+
+-- 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 957ed5f3c..aebefa2c6 100644
--- a/topology/test/regress/topogeo_addlinestring_expected
+++ b/topology/test/regress/topogeo_addlinestring_expected
@@ -243,3 +243,5 @@ t6023.2|errors|
t6062.edges|t
t6064.1|t
t6064.2|t
+t6120.start|1
+t6120.works|t
-----------------------------------------------------------------------
Summary of changes:
liblwgeom/topo/lwgeom_topo.c | 8 ++++----
topology/test/regress/topogeo_addlinestring.sql | 17 +++++++++++++++++
topology/test/regress/topogeo_addlinestring_expected | 2 ++
3 files changed, 23 insertions(+), 4 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list