[SCM] PostGIS branch master updated. 3.7.0beta1-127-g5852e7ad50

git at osgeo.org git at osgeo.org
Tue Jul 28 07:18:58 PDT 2026


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  5852e7ad5043d7cdb6367ad31a85b3b847b6f9ee (commit)
       via  65fff31faccef2585206b8aabebe4bd3cdc43eb2 (commit)
      from  56a92ee3a024fe187741b11b5a9b72cf51668a71 (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 5852e7ad5043d7cdb6367ad31a85b3b847b6f9ee
Merge: 56a92ee3a0 65fff31fac
Author: Darafei Praliaskouski <komzpa at gmail.com>
Date:   Tue Jul 28 07:18:48 2026 -0700

    Merge pull request 'doc(sfcgal): document skeleton functions dropping Z' (!584) from Komzpa/postgis:codex/trac-4323-20260728 into master
    
    The SFCGAL reference claims that straight-skeleton processing supports Z, while current `CG_StraightSkeleton`, `CG_ApproximateMedialAxis`, and their legacy `ST_*` aliases all return 2D output for 3D input.
    
    Document the dimensional behavior consistently for the current and legacy functions. Add regression coverage that fixes the 2D result as the documented contract, and record the correction in `NEWS`.
    
    Closes https://trac.osgeo.org/postgis/ticket/4323
    
    Reviewed-on: https://gitea.osgeo.org/postgis/postgis/pulls/584


commit 65fff31faccef2585206b8aabebe4bd3cdc43eb2
Author: Darafei Praliaskouski <me at komzpa.net>
Date:   Tue Jul 28 07:40:14 2026 +0400

    doc(sfcgal): document skeleton functions dropping Z
    
    Both straight skeleton and approximate medial axis ignore input Z and return 2D geometries. Add regression coverage for the current CG APIs and make the deprecated ST aliases explicit.
    
    Closes #4323

diff --git a/NEWS b/NEWS
index 3d458547cb..d22b4a48c8 100644
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,8 @@ These are only changes since 3.7.0beta1.
           stopwatches, so it no longer fails at random under CI load
           (Darafei Praliaskouski)
 
+ - #4323, GT-584, [sfcgal] Document that straight-skeleton and approximate-medial-axis
+          functions ignore input Z and return 2D geometries (Darafei Praliaskouski)
  - GT-545, Fix FlatGeobuf geometry, property, and spatial-index byte order on
           big-endian platforms (Darafei Praliaskouski)
  - [raster] Fix invalid reads in raster band initialization and
diff --git a/doc/reference_sfcgal.xml b/doc/reference_sfcgal.xml
index 7d11d2af0f..9b61927f27 100644
--- a/doc/reference_sfcgal.xml
+++ b/doc/reference_sfcgal.xml
@@ -2084,8 +2084,9 @@ FROM data;</programlisting>
             </para>
             <para role="availability" conformance="3.5.0">Availability: 3.5.0</para>
             <para role="sfcgal_requirement" conformance="1.3.8">Requires SFCGAL >= 1.3.8 for option use_distance_as_m</para>
+            <note><para>This function ignores the Z dimension.
+It always gives a 2D result even when used on a 3D geometry.</para></note>
             <para>&sfcgal_required;</para>
-            <para>&Z_support;</para>
             <para>&P_support;</para>
             <para>&T_support;</para>
         </refsection>
diff --git a/doc/reference_sfcgal_legacy.xml b/doc/reference_sfcgal_legacy.xml
index e70cfd5ae5..d12c56bd50 100644
--- a/doc/reference_sfcgal_legacy.xml
+++ b/doc/reference_sfcgal_legacy.xml
@@ -242,6 +242,9 @@
             <warning>
                 <para><function>ST_StraightSkeleton</function> is deprecated as of 3.1.0. Use <xref linkend="CG_StraightSkeleton" /> instead.</para>
             </warning>
+            <note><para>Like <function>CG_StraightSkeleton</function>, this
+            function ignores the Z dimension and always gives a 2D result,
+            even when used on a 3D geometry.</para></note>
             <para role="availability" conformance="2.1.0">Availability: 2.1.0</para>
             <para>&sfcgal_required;</para>
         </refsection>
@@ -265,6 +268,9 @@
             <warning>
                 <para><function>ST_ApproximateMedialAxis</function> is deprecated as of 3.5.0. Use <xref linkend="CG_ApproximateMedialAxis" /> instead.</para>
             </warning>
+            <note><para>Like <function>CG_ApproximateMedialAxis</function>,
+            this function ignores the Z dimension and always gives a 2D
+            result, even when used on a 3D geometry.</para></note>
             <para role="availability" conformance="2.2.0">Availability: 2.2.0</para>
             <para>&sfcgal_required;</para>
         </refsection>
diff --git a/sfcgal/regress/regress_sfcgal.sql b/sfcgal/regress/regress_sfcgal.sql
index bc3af1e574..bc9e61a110 100644
--- a/sfcgal/regress/regress_sfcgal.sql
+++ b/sfcgal/regress/regress_sfcgal.sql
@@ -75,6 +75,9 @@ SELECT 'CG_3DUnion (aggregate)', ABS(CG_Volume(CG_3DUnion(g))) - 40 < 1e-12 FROM
     SELECT CG_Extrude(ST_GeomFromText('POLYGON((-1 -1 -2, 1 -1 -2, 1 1 -2, -1 1 -2, -1 -1 -2))'), 0, 0, 4) AS g
 ) AS f;
 SELECT 'CG_StraightSkeleton', ST_AsText(CG_StraightSkeleton('POLYGON((1 1,2 1,2 2,1 2,1 1))'));
+-- #4323: both skeleton operations ignore an input Z dimension.
+SELECT 'CG_StraightSkeletonDropsZ', ST_NDims(CG_StraightSkeleton('POLYGON Z((0 0 10,0 50 10,10 50 10,10 0 10,0 0 10))'));
+SELECT 'CG_ApproximateMedialAxisDropsZ', ST_NDims(CG_ApproximateMedialAxis('POLYGON Z((0 0 10,0 50 10,10 50 10,10 0 10,0 0 10))'));
 SELECT 'CG_StraightSkeletonUseMDistance',
 CASE WHEN string_to_array(postgis_sfcgal_version(), '.')::int[] >= string_to_array('1.3.8', '.')::int[]
 THEN
diff --git a/sfcgal/regress/regress_sfcgal_expected b/sfcgal/regress/regress_sfcgal_expected
index d5c3005a2f..ea9616bb20 100644
--- a/sfcgal/regress/regress_sfcgal_expected
+++ b/sfcgal/regress/regress_sfcgal_expected
@@ -23,6 +23,8 @@ CG_3DConvexHull|80.9227
 CG_3DUnion|t
 CG_3DUnion (aggregate)|t
 CG_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))
+CG_StraightSkeletonDropsZ|2
+CG_ApproximateMedialAxisDropsZ|2
 CG_StraightSkeletonUseMDistance|MULTILINESTRING M ((0 0 0,0.5 0.5 0.5),(1 0 0,0.5 0.5 0.5),(1 1 0,0.5 0.5 0.5),(0 1 0,0.5 0.5 0.5))
 CG_Distance|5
 CG_3DDistance|1

-----------------------------------------------------------------------

Summary of changes:
 NEWS                                   | 2 ++
 doc/reference_sfcgal.xml               | 3 ++-
 doc/reference_sfcgal_legacy.xml        | 6 ++++++
 sfcgal/regress/regress_sfcgal.sql      | 3 +++
 sfcgal/regress/regress_sfcgal_expected | 2 ++
 5 files changed, 15 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list