[SCM] PostGIS branch master updated. 3.5.0-287-gd027c5f62
git at osgeo.org
git at osgeo.org
Thu Apr 24 21:12:28 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, master has been updated
via d027c5f62ab4f63ca1618d27edc1c01ac70c9264 (commit)
from 4389e29a5c720a58fc109969c1268d75e887e750 (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 d027c5f62ab4f63ca1618d27edc1c01ac70c9264
Author: Loïc Bartoletti <loic.bartoletti at oslandia.com>
Date: Tue Apr 22 16:31:02 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 25788c577..78d68a953 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,10 @@
PostGIS 3.6.0
2025/xx/xx
+* Bug fixes *
+
+ - #5818, GT-244 Fix CG_IsSolid function (Loïc Bartoletti)
+
* Breaking Changes *
- #5799, make ST_TileEnvelope clips envelopes to tile plane extent (Paul Ramsey)
diff --git a/liblwgeom/lwgeom.c b/liblwgeom/lwgeom.c
index c22fb621e..e7cea3de3 100644
--- a/liblwgeom/lwgeom.c
+++ b/liblwgeom/lwgeom.c
@@ -948,7 +948,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 c46949a38..881c19439 100644
--- a/sfcgal/regress/regress_sfcgal.sql
+++ b/sfcgal/regress/regress_sfcgal.sql
@@ -96,3 +96,18 @@ SELECT 'CG_Intersection', ST_AsText(CG_Intersection('LINESTRING(0 0, 5 5)', 'LIN
SELECT 'CG_Difference', ST_AsText(CG_Difference('LINESTRING(0 0, 1 0)', 'LINESTRING(0.5 0, 0.7 0)'));
SELECT 'CG_Union', ST_AsText(CG_Union('POINT(.5 0)', 'LINESTRING(-1 0,1 0)'));
SELECT 'CG_Triangulate', ST_AsText(CG_Triangulate('POLYGON((0.0 0.0,1.0 0.0,1.0 1.0,0.0 1.0,0.0 0.0),(0.2 0.2,0.2 0.8,0.8 0.8,0.8 0.2,0.2 0.2))'));
+-- Test https://trac.osgeo.org/postgis/ticket/5818
+WITH solid AS (
+ SELECT CG_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
+ 'CG_IsSolid',
+ CG_IsSolid(geom)
+FROM solid;
diff --git a/sfcgal/regress/regress_sfcgal_expected b/sfcgal/regress/regress_sfcgal_expected
index 7f18a4088..bdbc702da 100644
--- a/sfcgal/regress/regress_sfcgal_expected
+++ b/sfcgal/regress/regress_sfcgal_expected
@@ -37,3 +37,4 @@ CG_Intersection|POINT(2.5 2.5)
CG_Difference|MULTILINESTRING((0 0,0.5 0),(0.7 0,1 0))
CG_Union|LINESTRING(-1 0,0.5 0,1 0)
CG_Triangulate|TIN(((0.8 0.2,0.2 0.2,1 0,0.8 0.2)),((0.2 0.2,0 0,1 0,0.2 0.2)),((1 1,0.8 0.8,0.8 0.2,1 1)),((0 1,0 0,0.2 0.2,0 1)),((0 1,0.2 0.8,1 1,0 1)),((0 1,0.2 0.2,0.2 0.8,0 1)),((0.2 0.8,0.8 0.8,1 1,0.2 0.8)),((0.2 0.8,0.2 0.2,0.8 0.2,0.2 0.8)),((1 1,0.8 0.2,1 0,1 1)),((0.8 0.8,0.2 0.8,0.8 0.2,0.8 0.8)))
+CG_IsSolid|t
-----------------------------------------------------------------------
Summary of changes:
NEWS | 4 ++++
liblwgeom/lwgeom.c | 2 +-
sfcgal/regress/regress_sfcgal.sql | 15 +++++++++++++++
sfcgal/regress/regress_sfcgal_expected | 1 +
4 files changed, 21 insertions(+), 1 deletion(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list