[SCM] PostGIS branch stable-3.0 updated. 3.0.11-13-g09e4e919d

git at osgeo.org git at osgeo.org
Thu Apr 24 21:50:13 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.0 has been updated
       via  09e4e919d236c7a69989d0e1b40a6299663efafc (commit)
      from  92390ba3cbbd1a06c8d03cbaf62e1e8ed8c870cb (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 09e4e919d236c7a69989d0e1b40a6299663efafc
Author: Loïc Bartoletti <loic.bartoletti at oslandia.com>
Date:   Fri Apr 25 06:49:58 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 ffb7991ce..b414ed847 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,7 @@ Proj 4.9+ required.
 
  - #5795, [topology] Fix ST_NewEdgesSplit can cause invalid topology (Björn Harrtell)
  - Handle null returns from wkb parser, Paul Ramsey
+ - #5818, GT-244 Fix CG_IsSolid function (Loïc Bartoletti)
 
 PostGIS 3.0.11
 2024/02/06
diff --git a/liblwgeom/lwgeom.c b/liblwgeom/lwgeom.c
index 6e13e35a0..03e6e7419 100644
--- a/liblwgeom/lwgeom.c
+++ b/liblwgeom/lwgeom.c
@@ -930,7 +930,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/regress/sfcgal/regress_sfcgal.sql b/regress/sfcgal/regress_sfcgal.sql
index 6853ec4d3..76daa7789 100644
--- a/regress/sfcgal/regress_sfcgal.sql
+++ b/regress/sfcgal/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/regress/sfcgal/regress_sfcgal_expected b/regress/sfcgal/regress_sfcgal_expected
index a67ed5660..072f71a93 100644
--- a/regress/sfcgal/regress_sfcgal_expected
+++ b/regress/sfcgal/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 +-
 regress/sfcgal/regress_sfcgal.sql      | 15 +++++++++++++++
 regress/sfcgal/regress_sfcgal_expected |  1 +
 4 files changed, 18 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list