[SCM] PostGIS branch stable-3.2 updated. 3.2.10-91-g4532c8359d
git at osgeo.org
git at osgeo.org
Mon Jul 27 16:41:31 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.2 has been updated
via 4532c8359dafc46578eed7805b21934e7466f0e5 (commit)
via 51aa8b3219954a889a004df789195fbb45ef75e1 (commit)
via 8bb569d4b2ec5994bf74803f86037abba893051d (commit)
via 4dc85a753bfde50331e82afa4fa891feda2cdc33 (commit)
from 9f9b53dedc8d3b21ca4da135acf95a50182f3f39 (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 4532c8359dafc46578eed7805b21934e7466f0e5
Merge: 9f9b53dedc 51aa8b3219
Author: Darafei Praliaskouski <komzpa at gmail.com>
Date: Mon Jul 27 16:41:29 2026 -0700
Merge pull request 'Use GEOSSplit for ST_Split on stable 3.2' (!548) from Komzpa/postgis:codex/stsplit-geos315-stable-3.2 into stable-3.2
Reviewed-on: https://gitea.osgeo.org/postgis/postgis/pulls/548
diff --cc NEWS
index 6eb559d0b3,ff9b0345dc..39ee48a6c7
--- a/NEWS
+++ b/NEWS
@@@ -3,12 -3,9 +3,13 @@@ PostGIS 3.2.1
* 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)
- #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)
- [upgrade] Fix ST_TileEnvelope upgrade marker syntax
(Darafei Praliaskouski)
- #5899, pg_upgrade issue for non-standard geography SRID (Paul Ramsey)
commit 51aa8b3219954a889a004df789195fbb45ef75e1
Author: Darafei Praliaskouski <me at komzpa.net>
Date: Tue Jul 28 01:24:20 2026 +0400
NEWS: use original ST_Split reference on stable 3.2
diff --git a/NEWS b/NEWS
index 4975d6a512..ff9b0345dc 100644
--- a/NEWS
+++ b/NEWS
@@ -5,7 +5,7 @@ PostGIS 3.2.11
- #6094, [upgrade] Avoid legacy string literal warnings in downgrade checks
with standard_conforming_strings off (Darafei Praliaskouski)
- - GT-548, Fix ST_Split recursion with GEOS 3.15 (Paul Ramsey)
+ - #5916, Fix ST_Split recursion with GEOS 3.15 (Paul Ramsey)
- [upgrade] Fix ST_TileEnvelope upgrade marker syntax
(Darafei Praliaskouski)
- #5899, pg_upgrade issue for non-standard geography SRID (Paul Ramsey)
commit 8bb569d4b2ec5994bf74803f86037abba893051d
Author: Darafei Praliaskouski <me at komzpa.net>
Date: Mon Jul 27 05:57:48 2026 +0400
Rerun Woodie after runner network exhaustion
commit 4dc85a753bfde50331e82afa4fa891feda2cdc33
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 6c6396e6d9..4975d6a512 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,7 @@ PostGIS 3.2.11
- #6094, [upgrade] Avoid legacy string literal warnings in downgrade checks
with standard_conforming_strings off (Darafei Praliaskouski)
+ - GT-548, Fix ST_Split recursion with GEOS 3.15 (Paul Ramsey)
- [upgrade] Fix ST_TileEnvelope upgrade marker syntax
(Darafei Praliaskouski)
- #5899, pg_upgrade issue for non-standard geography SRID (Paul Ramsey)
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 5592492af9..b41a4946c4 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 +++++++++++++++++++++++++++++++++++++++++--
3 files changed, 81 insertions(+), 5 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list