[SCM] PostGIS branch stable-3.5 updated. 3.5.2-32-g9f41287f1
git at osgeo.org
git at osgeo.org
Thu Apr 24 21:26:29 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.5 has been updated
via 9f41287f1e982479611610a527ddf1d9d61e81f4 (commit)
from 507c7d251f1028280e7f4f4a4f7e6274a3655f32 (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 9f41287f1e982479611610a527ddf1d9d61e81f4
Author: Loïc Bartoletti <loic.bartoletti at oslandia.com>
Date: Fri Apr 25 06:26:10 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 17f42b368..7ca3d5ac4 100644
--- a/NEWS
+++ b/NEWS
@@ -16,7 +16,7 @@ PostgreSQL 12-18 required. GEOS 3.8+ required. Proj 6.1+ required.
- #5876, ST_AddPoint with empty argument adds garbage (Paul Ramsey)
- #5874, Line substring returns wrong answer (Paul Ramsey)
- #5829, geometry_columns with non-standard constraints (Paul Ramsey)
-
+- #5818, GT-244 Fix CG_IsSolid function (Loïc Bartoletti)
PostGIS 3.5.2
2025/01/18
diff --git a/liblwgeom/lwgeom.c b/liblwgeom/lwgeom.c
index 86bd54143..b581c9702 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 bbbc8fe3a..22a131097 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 772eeb04f..5545f6fc3 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 | 2 +-
liblwgeom/lwgeom.c | 2 +-
sfcgal/regress/regress_sfcgal.sql | 15 +++++++++++++++
sfcgal/regress/regress_sfcgal_expected | 1 +
4 files changed, 18 insertions(+), 2 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list