[SCM] PostGIS branch stable-3.2 updated. 3.2.7-30-gd221dd938

git at osgeo.org git at osgeo.org
Thu Apr 24 21:46:01 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.2 has been updated
       via  d221dd93806c5de63425c54627051ded3dc7c316 (commit)
      from  2cb742f8e1d48fc4458544003c961c7f30b30327 (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 d221dd93806c5de63425c54627051ded3dc7c316
Author: Loïc Bartoletti <loic.bartoletti at oslandia.com>
Date:   Fri Apr 25 06:45:46 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 36997da25..ed1b876a9 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,7 @@ Proj 4.9+ required.
 * Bug Fixes  *
 
  - #5876, Fix ST_AddPoint with empty point argument (Paul Ramsey)
+ - #5818, GT-244 Fix CG_IsSolid function (Loïc Bartoletti)
 
 
 PostGIS 3.2.8
diff --git a/liblwgeom/lwgeom.c b/liblwgeom/lwgeom.c
index e9d6bc088..d367e65fd 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