[SCM] PostGIS branch stable-3.4 updated. 3.4.6-101-gc12e912a12
git at osgeo.org
git at osgeo.org
Mon Jul 27 16:41:03 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.4 has been updated
via c12e912a12a253032c26b4ca566e782120490cb6 (commit)
via 8fcb3c08b403c9038301c81e2a510d849039dade (commit)
via 7c0fdbf6b6d734e19440b37a8603908a8d7a0c89 (commit)
via 59c1243777e011fb9e027e5108167334259a0775 (commit)
via 54dec6a88a3d5341b4d4fcb3e4e8ff9b7188f04b (commit)
from ff996f11cb5e7645510394ca6233a76374a12094 (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 c12e912a12a253032c26b4ca566e782120490cb6
Merge: ff996f11cb 8fcb3c08b4
Author: Darafei Praliaskouski <komzpa at gmail.com>
Date: Mon Jul 27 16:41:02 2026 -0700
Merge pull request 'Use GEOSSplit for ST_Split on stable 3.4' (!546) from Komzpa/postgis:codex/stsplit-geos315-stable-3.4 into stable-3.4
Reviewed-on: https://gitea.osgeo.org/postgis/postgis/pulls/546
diff --cc NEWS
index 17e4b51e17,c9dabaddd1..890666e4ef
--- a/NEWS
+++ b/NEWS
@@@ -3,14 -3,9 +3,15 @@@ PostGIS 3.4.
* Bug Fixes *
+ - GT-522, Reject malformed GSERIALIZED payload counts before deserializing
+ geometry data (Darafei Praliaskouski)
+ - GT-523, [raster] Fix invalid reads in geotransform property access
+ (Darafei Praliaskouski)
+ - GT-519, Reject invalid ST_LargestEmptyCircle boundaries before GEOS can
+ spend unbounded time on them (Darafei Praliaskouski)
- #6094, [upgrade] Avoid legacy string literal warnings in downgrade checks
with standard_conforming_strings off (Darafei Praliaskouski)
+ - #5916, Fix ST_Split recursion with GEOS 3.15 (Paul Ramsey)
- #6042, Skip downgrade checks when source extension libraries cannot
be loaded in the current dependency environment
(Darafei Praliaskouski)
commit 8fcb3c08b403c9038301c81e2a510d849039dade
Author: Darafei Praliaskouski <me at komzpa.net>
Date: Tue Jul 28 01:23:51 2026 +0400
NEWS: use original ST_Split reference on stable 3.4
diff --git a/NEWS b/NEWS
index e219425587..c9dabaddd1 100644
--- a/NEWS
+++ b/NEWS
@@ -5,7 +5,7 @@ PostGIS 3.4.7
- #6094, [upgrade] Avoid legacy string literal warnings in downgrade checks
with standard_conforming_strings off (Darafei Praliaskouski)
- - GT-546, Fix ST_Split recursion with GEOS 3.15 (Paul Ramsey)
+ - #5916, Fix ST_Split recursion with GEOS 3.15 (Paul Ramsey)
- #6042, Skip downgrade checks when source extension libraries cannot
be loaded in the current dependency environment
(Darafei Praliaskouski)
commit 7c0fdbf6b6d734e19440b37a8603908a8d7a0c89
Author: Darafei Praliaskouski <me at komzpa.net>
Date: Mon Jul 27 17:10:45 2026 +0400
regress: relax stable 3.4 buffer interrupt timing
diff --git a/regress/core/interrupt_buffer.sql b/regress/core/interrupt_buffer.sql
index 949fc7e285..5756af4e61 100644
--- a/regress/core/interrupt_buffer.sql
+++ b/regress/core/interrupt_buffer.sql
@@ -21,7 +21,7 @@ SET statement_timeout TO 100;
select ST_Buffer(g,100) from _inputs WHERE id = 1;
--( select (st_dumppoints(st_buffer(st_makepoint(0,0),10000,100000))).geom g) foo;
-- it may take some more to interrupt st_buffer, see
-SELECT _timecheck('buffer', '350ms');
+SELECT _timecheck('buffer', '600ms');
-- Not affected by old timeout
SELECT '1', ST_NPoints(ST_Buffer('POINT(4 0)'::geometry, 2, 1));
commit 59c1243777e011fb9e027e5108167334259a0775
Author: Darafei Praliaskouski <me at komzpa.net>
Date: Mon Jul 27 05:57:35 2026 +0400
Rerun Woodie after runner network exhaustion
commit 54dec6a88a3d5341b4d4fcb3e4e8ff9b7188f04b
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date: Tue Jun 30 12:05:14 2026 -0700
Use GEOSSplit where available for ST_Split
(cherry picked from commit 370c6a160a21d46b0768fb70ea0d75292cc475d0)
diff --git a/NEWS b/NEWS
index b62241c5d9..e219425587 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,7 @@ PostGIS 3.4.7
- #6094, [upgrade] Avoid legacy string literal warnings in downgrade checks
with standard_conforming_strings off (Darafei Praliaskouski)
+ - GT-546, Fix ST_Split recursion with GEOS 3.15 (Paul Ramsey)
- #6042, Skip downgrade checks when source extension libraries cannot
be loaded in the current dependency environment
(Darafei Praliaskouski)
diff --git a/liblwgeom/cunit/cu_wrapx.c b/liblwgeom/cunit/cu_wrapx.c
index a5ca09a285..cde804577e 100644
--- a/liblwgeom/cunit/cu_wrapx.c
+++ b/liblwgeom/cunit/cu_wrapx.c
@@ -83,9 +83,11 @@ static void test_lwgeom_wrapx(void)
lwgeom_free(tmp);
CU_ASSERT_FATAL(ret != NULL);
obt_wkt = lwgeom_to_ewkt(ret);
- tmp = lwgeom_from_wkt(
- "MULTILINESTRING((0 0,8 0),(-2 0,0 0))",
- LW_PARSER_CHECK_NONE);
+#if POSTGIS_GEOS_VERSION < 31500
+ tmp = lwgeom_from_wkt("MULTILINESTRING((0 0,8 0),(-2 0,0 0))", LW_PARSER_CHECK_NONE);
+#else
+ tmp = lwgeom_from_wkt("LINESTRING(-2 0,0 0,8 0)", LW_PARSER_CHECK_NONE);
+#endif
tmp2 = lwgeom_normalize(tmp);
lwgeom_free(tmp);
exp_wkt = lwgeom_to_ewkt(tmp2);
diff --git a/liblwgeom/lwgeom_geos_split.c b/liblwgeom/lwgeom_geos_split.c
index 3dba1d06dd..f8363c966b 100644
--- a/liblwgeom/lwgeom_geos_split.c
+++ b/liblwgeom/lwgeom_geos_split.c
@@ -111,13 +111,23 @@ lwline_split_by_line(const LWLINE* lwline_in, const LWGEOM* blade_in)
return NULL;
}
-
- gdiff = GEOSDifference(g1,g2);
+#if POSTGIS_GEOS_VERSION >= 31500
+ /* GEOS 3.15 added an explicit splitter. Older GEOS relies on the
+ * side-effect of GEOSDifference returning the input split at the
+ * crossing points of the (non-overlapping) blade. */
+ gdiff = GEOSSplit(g1, g2);
+#else
+ gdiff = GEOSDifference(g1, g2);
+#endif
GEOSGeom_destroy(g1);
GEOSGeom_destroy(g2);
if (gdiff == NULL)
{
+#if POSTGIS_GEOS_VERSION >= 31500
+ lwerror("GEOSSplit: %s", lwgeom_geos_errmsg);
+#else
lwerror("GEOSDifference: %s", lwgeom_geos_errmsg);
+#endif
return NULL;
}
@@ -353,6 +363,68 @@ lwline_split(const LWLINE* lwline_in, const LWGEOM* blade_in)
static LWGEOM*
lwpoly_split_by_line(const LWPOLY* lwpoly_in, const LWGEOM* blade_in)
{
+#if POSTGIS_GEOS_VERSION >= 31500
+ /* GEOS 3.15 splits polygons directly, filtering out the pieces that
+ * fall inside holes for us. On older GEOS we reproduce that logic by
+ * polygonizing the boundary unioned with the blade and discarding the
+ * pieces whose point-on-surface is not contained by the input (#else). */
+ LWGEOM *split;
+ LWCOLLECTION *out;
+ GEOSGeometry *g1;
+ GEOSGeometry *g2;
+ GEOSGeometry *gsplit;
+ int hasZ = FLAGS_GET_Z(lwpoly_in->flags);
+
+ initGEOS(lwgeom_geos_error, lwgeom_geos_error);
+
+ g1 = LWGEOM2GEOS((LWGEOM *)lwpoly_in, 0);
+ if (NULL == g1)
+ {
+ lwerror("LWGEOM2GEOS: %s", lwgeom_geos_errmsg);
+ return NULL;
+ }
+
+ g2 = LWGEOM2GEOS(blade_in, 0);
+ if (NULL == g2)
+ {
+ GEOSGeom_destroy(g1);
+ lwerror("LWGEOM2GEOS: %s", lwgeom_geos_errmsg);
+ return NULL;
+ }
+
+ gsplit = GEOSSplit(g1, g2);
+ GEOSGeom_destroy(g1);
+ GEOSGeom_destroy(g2);
+ if (NULL == gsplit)
+ {
+ lwerror("GEOSSplit: %s", lwgeom_geos_errmsg);
+ return NULL;
+ }
+
+ split = GEOS2LWGEOM(gsplit, hasZ);
+ GEOSGeom_destroy(gsplit);
+ if (NULL == split)
+ {
+ lwerror("GEOS2LWGEOM: %s", lwgeom_geos_errmsg);
+ return NULL;
+ }
+
+ /* GEOSSplit always returns a collection, but wrap defensively */
+ out = lwgeom_as_lwcollection(split);
+ if (!out)
+ {
+ LWGEOM **components = lwalloc(sizeof(LWGEOM *));
+ components[0] = split;
+ out = lwcollection_construct(COLLECTIONTYPE, lwpoly_in->srid, NULL, 1, components);
+ }
+ else
+ {
+ lwgeom_set_srid((LWGEOM *)out, lwpoly_in->srid);
+ out->type = COLLECTIONTYPE;
+ }
+
+ return (LWGEOM *)out;
+#else
LWCOLLECTION* out;
GEOSGeometry* g1;
GEOSGeometry* g2;
@@ -491,6 +563,7 @@ lwpoly_split_by_line(const LWPOLY* lwpoly_in, const LWGEOM* blade_in)
GEOSGeom_destroy(polygons);
return (LWGEOM*)out;
+#endif /* POSTGIS_GEOS_VERSION >= 31500 */
}
static LWGEOM*
-----------------------------------------------------------------------
Summary of changes:
NEWS | 1 +
liblwgeom/cunit/cu_wrapx.c | 8 ++--
liblwgeom/lwgeom_geos_split.c | 77 ++++++++++++++++++++++++++++++++++++++-
regress/core/interrupt_buffer.sql | 2 +-
4 files changed, 82 insertions(+), 6 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list