[SCM] PostGIS branch stable-3.1 updated. 3.1.11-22-g36115b41a
git at osgeo.org
git at osgeo.org
Thu Apr 24 21:47:26 PDT 2025
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.1 has been updated
via 36115b41a44744516afe48fae158276fc596ce97 (commit)
from c3df6df02d6160b959400fefbdb9a5620ec4420c (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 36115b41a44744516afe48fae158276fc596ce97
Author: Loïc Bartoletti <loic.bartoletti at oslandia.com>
Date: Fri Apr 25 06:47:09 2025 +0200
fix(CG_IsSolid): get SOLID flag
The flag used was not the good one. GEODETIC instead of SOLID.
diff --git a/NEWS b/NEWS
index eb7f96642..d26f2de4e 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,7 @@ YYYY/MM/DD
* Bug Fixes *
- #5876, Fix ST_AddPoint with empty point argument (Paul Ramsey)
+ - #5818, GT-244 Fix CG_IsSolid function (Loïc Bartoletti)
PostGIS 3.1.12
diff --git a/liblwgeom/lwgeom.c b/liblwgeom/lwgeom.c
index f3ccfaf31..46af9dd21 100644
--- a/liblwgeom/lwgeom.c
+++ b/liblwgeom/lwgeom.c
@@ -931,7 +931,7 @@ int
lwgeom_is_solid(const LWGEOM *geom)
{
if ( ! geom ) return LW_FALSE;
- return FLAGS_GET_GEODETIC(geom->flags);
+ return FLAGS_GET_SOLID(geom->flags);
}
int
diff --git a/sfcgal/regress/regress_sfcgal.sql b/sfcgal/regress/regress_sfcgal.sql
index 6853ec4d3..76daa7789 100644
--- a/sfcgal/regress/regress_sfcgal.sql
+++ b/sfcgal/regress/regress_sfcgal.sql
@@ -31,3 +31,18 @@ SELECT 'ST_MinkowskiSum', ST_AsText(ST_MinkowskiSum('LINESTRING(0 0,4 0)','POLYG
SELECT 'ST_StraightSkeleton', ST_AsText(ST_StraightSkeleton('POLYGON((1 1,2 1,2 2,1 2,1 1))'));
SELECT 'ST_ConstrainedDelaunayTriangles', ST_AsText(ST_ConstrainedDelaunayTriangles('GEOMETRYCOLLECTION(POINT(0 0), POLYGON((2 2, 2 -2, 4 0, 2 2)))'));
SELECT 'postgis_sfcgal_noop', ST_NPoints(postgis_sfcgal_noop(ST_Buffer('POINT(0 0)', 5)));
+-- Test https://trac.osgeo.org/postgis/ticket/5818
+ WITH solid AS (
+ SELECT ST_MakeSolid(
+ 'POLYHEDRALSURFACE Z (((-1 1 -1,1 1 -1,1 -1 -1,-1 -1 -1,-1 1 -1)),
+ ((-1 1 1,-1 -1 1,1 -1 1,1 1 1,-1 1 1)),
+ ((-1 1 -1,-1 1 1,1 1 1,1 1 -1,-1 1 -1)),
+ ((1 1 -1,1 1 1,1 -1 1,1 -1 -1,1 1 -1)),
+ ((1 -1 -1,1 -1 1,-1 -1 1,-1 -1 -1,1 -1 -1)),
+ ((-1 -1 -1,-1 -1 1,-1 1 1,-1 1 -1,-1 -1 -1)))'
+ ) geom
+ )
+ SELECT
+ 'ST_IsSolid',
+ ST_IsSolid(geom)
+ FROM solid;
diff --git a/sfcgal/regress/regress_sfcgal_expected b/sfcgal/regress/regress_sfcgal_expected
index a67ed5660..072f71a93 100644
--- a/sfcgal/regress/regress_sfcgal_expected
+++ b/sfcgal/regress/regress_sfcgal_expected
@@ -11,3 +11,4 @@ ST_MinkowskiSum|MULTIPOLYGON(((0 0,1 0,5 0,5 1,4 1,0 1,0 0)))
ST_StraightSkeleton|MULTILINESTRING((1 1,1.5 1.5),(2 1,1.5 1.5),(2 2,1.5 1.5),(1 2,1.5 1.5))
ST_ConstrainedDelaunayTriangles|TIN(((4 0,2 2,2 -2,4 0)),((2 2,0 0,2 -2,2 2)))
postgis_sfcgal_noop|33
+ST_IsSolid|t
-----------------------------------------------------------------------
Summary of changes:
NEWS | 1 +
liblwgeom/lwgeom.c | 2 +-
sfcgal/regress/regress_sfcgal.sql | 15 +++++++++++++++
sfcgal/regress/regress_sfcgal_expected | 1 +
4 files changed, 18 insertions(+), 1 deletion(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list