[postgis-tickets] [SCM] PostGIS branch master updated. 3.2.0-725-gb39f92142

git at osgeo.org git at osgeo.org
Fri Apr 15 09:42:23 PDT 2022


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  b39f921427795b27dc121d0de29950b9fac75c97 (commit)
       via  8d69d08b68c4f507cf14b69fa73c3a97ac2f6d4d (commit)
       via  0141554c6cc14c15a2edb48eb1474b0cb9bafd02 (commit)
       via  e3d36f810cf67315da6ca22ed735126eb0fd9d69 (commit)
      from  2eb420ed4f3defb28e496330dc03520f41b7680a (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 b39f921427795b27dc121d0de29950b9fac75c97
Merge: 2eb420ed4 8d69d08b6
Author: Regina Obe <lr at pcorp.us>
Date:   Fri Apr 15 11:53:46 2022 -0400

    Add SFCGAL ST_3DUnion aggregate (Sergei Shoulbakov)
    Closes #5132
    Closes https://github.com/postgis/postgis/pull/683
    
    Merge remote-tracking branch 'konturio/aggregate-3dunion'

diff --cc NEWS
index e043379ff,8093b473a..68a10949c
--- a/NEWS
+++ b/NEWS
@@@ -32,6 -30,6 +32,7 @@@ PostGIS 3.3.0de
    - postgis_sfcgal: sfcgal_full_version - reports BOOST and CGAL version
      (Loïc Bartoletti)
    - GH659, MARC21/XML, ST_GeomFromMARC21, ST_AsMARC21 (Jim Jones)
++  - #5132, GH683, sfcgal: ST_3DUnion aggregate function (Sergei Shoulbakov)
  
   * Bug Fix *
     - #5100, Support for PostgreSQL 15 (atoi removal) (Laurenz Albe)

commit 8d69d08b68c4f507cf14b69fa73c3a97ac2f6d4d
Author: sergei sh <sshoulbakov at kontur.io>
Date:   Fri Apr 15 14:57:18 2022 +0300

    ST_3DUnion tests

diff --git a/sfcgal/regress/regress_sfcgal.sql b/sfcgal/regress/regress_sfcgal.sql
index a337793b6..582ed2728 100644
--- a/sfcgal/regress/regress_sfcgal.sql
+++ b/sfcgal/regress/regress_sfcgal.sql
@@ -32,3 +32,14 @@ SELECT 'ST_StraightSkeleton', ST_AsText(ST_StraightSkeleton('POLYGON((1 1,2 1,2
 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)));
 SELECT 'ST_3DConvexHull', ST_AsText(ST_3DConvexHull('MULTIPOINTZ(0 0 5, 1 5 3, 5 7 6, 9 5 3 , 5 7 5, 6 3 5)'));
+-- Result of ST_3DUnion is not deterministic and cannot be checked by
+-- simple string comparison
+SELECT 'ST_3DUnion', ABS(ST_Volume(ST_3DUnion(g1, g2)) - 40) < 1e-12 FROM (
+    SELECT ST_Extrude(ST_GeomFromText('POLYGON((-2 -2 -1, 2 -2 -1, 2 2 -1, -2 2 -1, -2 -2 -1))'), 0, 0, 2) AS g1,
+    ST_Extrude(ST_GeomFromText('POLYGON((-1 -1 -2, 1 -1 -2, 1 1 -2, -1 1 -2, -1 -1 -2))'), 0, 0, 4) AS g2
+) AS f;
+SELECT 'ST_3DUnion (aggregate)', ABS(ST_Volume(ST_3DUnion(g))) - 40 < 1e-12 FROM (
+    SELECT ST_Extrude(ST_GeomFromText('POLYGON((-2 -2 -1, 2 -2 -1, 2 2 -1, -2 2 -1, -2 -2 -1))'), 0, 0, 2) AS g
+    UNION
+    SELECT ST_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;
diff --git a/sfcgal/regress/regress_sfcgal_expected b/sfcgal/regress/regress_sfcgal_expected
index 347a8e749..511be0b0f 100644
--- a/sfcgal/regress/regress_sfcgal_expected
+++ b/sfcgal/regress/regress_sfcgal_expected
@@ -12,3 +12,5 @@ ST_StraightSkeleton|MULTILINESTRING((1 1,1.5 1.5),(2 1,1.5 1.5),(2 2,1.5 1.5),(1
 ST_ConstrainedDelaunayTriangles|TIN(((4 0,2 2,2 -2,4 0)),((2 2,0 0,2 -2,2 2)))
 postgis_sfcgal_noop|33
 ST_3DConvexHull|POLYHEDRALSURFACE Z (((1 5 3,9 5 3,0 0 5,1 5 3)),((1 5 3,0 0 5,5 7 6,1 5 3)),((5 7 6,5 7 5,1 5 3,5 7 6)),((0 0 5,6 3 5,5 7 6,0 0 5)),((6 3 5,9 5 3,5 7 6,6 3 5)),((0 0 5,9 5 3,6 3 5,0 0 5)),((9 5 3,5 7 5,5 7 6,9 5 3)),((1 5 3,5 7 5,9 5 3,1 5 3)))
+ST_3DUnion|t
+ST_3DUnion (aggregate)|t

commit 0141554c6cc14c15a2edb48eb1474b0cb9bafd02
Author: sergei sh <sshoulbakov at kontur.io>
Date:   Wed Apr 13 11:47:15 2022 +0300

    aggregate ST_3DUnion: documentation fix

diff --git a/doc/reference_sfcgal.xml b/doc/reference_sfcgal.xml
index b4a26cb34..ba0d26626 100644
--- a/doc/reference_sfcgal.xml
+++ b/doc/reference_sfcgal.xml
@@ -815,7 +815,8 @@ FROM ( SELECT ST_Extrude(ST_Buffer(ST_GeomFromText('POINT(100 90)'),
 		<title>Description</title>
 
 
-		<para>Availability: 2.2.0, aggregate variant: 3.0.0</para>
+		<para>Availability: 2.2.0</para>
+		<para>Availability: 3.3.0 aggregate variant was added</para>
 		<para>&sfcgal_required;</para>
 		<para>&Z_support;</para>
 		<para>&P_support;</para>

commit e3d36f810cf67315da6ca22ed735126eb0fd9d69
Author: sergei sh <sshoulbakov at kontur.io>
Date:   Tue Apr 12 16:13:00 2022 +0300

    aggregate ST_3DUnion

diff --git a/doc/reference_sfcgal.xml b/doc/reference_sfcgal.xml
index 00a14b4ae..b4a26cb34 100644
--- a/doc/reference_sfcgal.xml
+++ b/doc/reference_sfcgal.xml
@@ -794,7 +794,7 @@ FROM ( SELECT ST_Extrude(ST_Buffer(ST_GeomFromText('POINT(100 90)'),
 	  <refnamediv>
 		<refname>ST_3DUnion</refname>
 
-		<refpurpose>Perform 3D union</refpurpose>
+		<refpurpose>Perform 3D union.</refpurpose>
 	  </refnamediv>
 
 	  <refsynopsisdiv>
@@ -804,6 +804,10 @@ FROM ( SELECT ST_Extrude(ST_Buffer(ST_GeomFromText('POINT(100 90)'),
 			<paramdef><type>geometry</type> <parameter>geom1</parameter></paramdef>
 			<paramdef><type>geometry</type> <parameter>geom2</parameter></paramdef>
 		  </funcprototype>
+		  <funcprototype>
+			<funcdef>geometry <function>ST_3DUnion</function></funcdef>
+			<paramdef><type>geometry set</type> <parameter>g1field</parameter></paramdef>
+		  </funcprototype>
 		</funcsynopsis>
 	  </refsynopsisdiv>
 
@@ -811,11 +815,20 @@ FROM ( SELECT ST_Extrude(ST_Buffer(ST_GeomFromText('POINT(100 90)'),
 		<title>Description</title>
 
 
-		<para>Availability: 2.2.0</para>
+		<para>Availability: 2.2.0, aggregate variant: 3.0.0</para>
 		<para>&sfcgal_required;</para>
 		<para>&Z_support;</para>
 		<para>&P_support;</para>
 		<para>&T_support;</para>
+
+        <para>
+            <emphasis role="bold">Aggregate variant:</emphasis>
+            returns a geometry that is the 3D union of a rowset of geometries.
+            The ST_3DUnion() function is an "aggregate"
+            function in the terminology of PostgreSQL. That means that it
+            operates on rows of data, in the same way the SUM() and AVG()
+            functions do and like most aggregates, it also ignores NULL geometries.
+        </para>
 	  </refsection>
 
 		  <refsection>
diff --git a/sfcgal/sfcgal.sql.in b/sfcgal/sfcgal.sql.in
index 3556e834c..57fe6ddd6 100644
--- a/sfcgal/sfcgal.sql.in
+++ b/sfcgal/sfcgal.sql.in
@@ -66,6 +66,13 @@ CREATE OR REPLACE FUNCTION ST_3DUnion(geom1 geometry, geom2 geometry)
        LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
        COST 100;
 
+-- Availability: 3.3.0
+CREATE AGGREGATE ST_3DUnion(geometry) (
+       sfunc = ST_3DUnion,
+       stype = geometry,
+       parallel = safe
+);
+
 -- Availability: 2.1.0
 CREATE OR REPLACE FUNCTION ST_Tesselate(geometry)
        RETURNS geometry

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

Summary of changes:
 NEWS                                   |  1 +
 doc/reference_sfcgal.xml               | 16 +++++++++++++++-
 sfcgal/regress/regress_sfcgal.sql      | 11 +++++++++++
 sfcgal/regress/regress_sfcgal_expected |  2 ++
 sfcgal/sfcgal.sql.in                   |  7 +++++++
 5 files changed, 36 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list