[SCM] PostGIS branch stable-3.5 updated. 3.5.7-141-gf0cdc8549
git at osgeo.org
git at osgeo.org
Thu Sep 3 11:02:40 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.5 has been updated
via f0cdc854901ea6f02ec81dcb751f1355e3739af7 (commit)
from da7602bad94e1ba6de48571f16fed93aef32c3ce (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 f0cdc854901ea6f02ec81dcb751f1355e3739af7
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.5 branch (3.5.8dev)
diff --git a/NEWS b/NEWS
index e68fa1907..8cd60959a 100644
--- a/NEWS
+++ b/NEWS
@@ -1,8 +1,10 @@
-PostGIS 3.5.8
+PostGIS 3.5.8dev
2026/xx/xx
* Bug Fixes *
+ - #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
@@ -73,7 +75,7 @@ PostGIS 3.5.7
- #5916, ST_Split hang with very large ordinates (Paul Ramsey)
- #5989, CurvePolygon distance corner case (Paul Ramsey)
- #5357, ST_LineFromEncodedPolyline dropping close points (Paul Ramsey)
- - OSSFuzz 525554772, avoid signed integer overflow (Even Rouault)
+ - OSSFuzz 525554772, avoid signed integer overflow (Even Rouault)
- OSSFuzz 525548201, avoid overly nested inputs (Darafei Praliaskouski)
- Avoid Inf loop in Geohash calculation (Paul Ramsey)
- [address_standardizer] Avoid unsafe table-name handling and out-of-bounds
diff --git a/liblwgeom/topo/lwgeom_topo.c b/liblwgeom/topo/lwgeom_topo.c
index ba358fee7..ac7937572 100644
--- a/liblwgeom/topo/lwgeom_topo.c
+++ b/liblwgeom/topo/lwgeom_topo.c
@@ -6991,12 +6991,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 | 6 ++++--
liblwgeom/topo/lwgeom_topo.c | 8 ++++----
topology/test/regress/topogeo_addlinestring.sql | 15 +++++++++++++++
topology/test/regress/topogeo_addlinestring_expected | 2 ++
4 files changed, 25 insertions(+), 6 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list