[SCM] PostGIS branch master updated. 3.4.0rc1-757-g6c9cb16cc

git at osgeo.org git at osgeo.org
Sun Nov 12 23:47:27 PST 2023


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  6c9cb16cc8d1161f72b22e5f93b8a08b2d5e1813 (commit)
       via  ee7e9e7a1a8070e7dd7831b930ebf79ad8884dee (commit)
       via  2104514430c4e62c22f598aeade299ebe788cd65 (commit)
      from  e12e7302bfe021026d8f3d8b567a3f048a782771 (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 6c9cb16cc8d1161f72b22e5f93b8a08b2d5e1813
Author: Loïc Bartoletti <loic.bartoletti at oslandia.com>
Date:   Fri Nov 10 07:29:14 2023 +0100

    Rename to CG_*Partition
    New 2D Partition Logic using SFCGAL 1.5.0
    Closes https://git.osgeo.org/gitea/postgis/postgis/pulls/123

diff --git a/NEWS b/NEWS
index 4cc5c8ba4..c6602214a 100644
--- a/NEWS
+++ b/NEWS
@@ -26,7 +26,7 @@ To take advantage of all SFCGAL featurs, SFCGAL 1.5.0+ is needed.
   - #5055, add explicit <> geometry operator to prevent non-unique
            error with <> and != (Paul Ramsey)
   - Add ST_HasZ/ST_HasM (Loïc Bartoletti)
-  - postgis_sfcgal: ST_YMonotonePartition, ST_ApproxConvexPartition, ST_GreeneApproxConvexPartition and ST_OptimalConvexPartition (Loïc Bartoletti)
+  - GT-123, postgis_sfcgal: CG_YMonotonePartition, CG_ApproxConvexPartition, CG_GreeneApproxConvexPartition and CG_OptimalConvexPartition (Loïc Bartoletti)
 
 * Enhancements *
 
diff --git a/doc/reference_sfcgal.xml b/doc/reference_sfcgal.xml
index 08eded571..abb1fab65 100644
--- a/doc/reference_sfcgal.xml
+++ b/doc/reference_sfcgal.xml
@@ -1433,9 +1433,9 @@ MULTIPOLYGON(
 
 	</refentry>
 
-    <refentry xml:id="ST_YMonotonePartition">
+    <refentry xml:id="CG_YMonotonePartition">
 	  <refnamediv>
-		<refname>ST_YMonotonePartition</refname>
+		<refname>CG_YMonotonePartition</refname>
 
 		<refpurpose>Computes y-monotone partition of the polygon geometry</refpurpose>
 	  </refnamediv>
@@ -1443,7 +1443,7 @@ MULTIPOLYGON(
 	  <refsynopsisdiv>
 		<funcsynopsis>
 		  <funcprototype>
-			<funcdef>geometry <function>ST_YMonotonePartition</function></funcdef>
+			<funcdef>geometry <function>CG_YMonotonePartition</function></funcdef>
 			<paramdef><type>geometry</type> <parameter>geom</parameter></paramdef>
 		  </funcprototype>
 		</funcsynopsis>
@@ -1473,23 +1473,23 @@ MULTIPOLYGON(
         <imageobject>
           <imagedata fileref="images/st_ymonotonepartition01.png" />
         </imageobject>
-        <caption><para>Y-Monotone Partition (same example As <xref linkend="ST_ApproxConvexPartition" />,  <xref linkend="ST_GreeneApproxConvexPartition" /> and <xref linkend="ST_OptimalConvexPartition" />)</para></caption>
+        <caption><para>Y-Monotone Partition (same example As <xref linkend="CG_ApproxConvexPartition" />,  <xref linkend="CG_GreeneApproxConvexPartition" /> and <xref linkend="CG_OptimalConvexPartition" />)</para></caption>
       </mediaobject>
     </informalfigure>
-         <programlisting>SELECT ST_AsText(ST_YMonotonePartition('POLYGON((391 374, 240 431, 252 340, 374 320, 289 214, 134 390, 68 186, 154 259, 161 107, 435 108, 208 148, 295 160, 421 212, 441 303, 391 374))'::geometry));</programlisting>
+         <programlisting>SELECT ST_AsText(CG_YMonotonePartition('POLYGON((391 374, 240 431, 252 340, 374 320, 289 214, 134 390, 68 186, 154 259, 161 107, 435 108, 208 148, 295 160, 421 212, 441 303, 391 374))'::geometry));</programlisting>
           <screen>GEOMETRYCOLLECTION(POLYGON((134 390,68 186,154 259,134 390)),POLYGON((289 214,134 390,154 259,161 107,435 108,208 148,295 160,421 212,289 214)),POLYGON((391 374,240 431,252 340,374 320,289 214,421 212,441 303,391 374)))</screen>
         </para>
 	  </refsection>
       <refsection>
 		<title>See Also</title>
-                <para><xref linkend="ST_ApproxConvexPartition" />, <xref linkend="ST_GreeneApproxConvexPartition" />, <xref linkend="ST_OptimalConvexPartition" /></para>
+                <para><xref linkend="CG_ApproxConvexPartition" />, <xref linkend="CG_GreeneApproxConvexPartition" />, <xref linkend="CG_OptimalConvexPartition" /></para>
 	  </refsection>
 
 	</refentry>
 
-<refentry xml:id="ST_ApproxConvexPartition">
+<refentry xml:id="CG_ApproxConvexPartition">
 	  <refnamediv>
-		<refname>ST_ApproxConvexPartition</refname>
+		<refname>CG_ApproxConvexPartition</refname>
 
 		<refpurpose>Computes approximal convex partition of the polygon geometry</refpurpose>
 	  </refnamediv>
@@ -1497,7 +1497,7 @@ MULTIPOLYGON(
 	  <refsynopsisdiv>
 		<funcsynopsis>
 		  <funcprototype>
-			<funcdef>geometry <function>ST_ApproxConvexPartition</function></funcdef>
+			<funcdef>geometry <function>CG_ApproxConvexPartition</function></funcdef>
 			<paramdef><type>geometry</type> <parameter>geom</parameter></paramdef>
 		  </funcprototype>
 		</funcsynopsis>
@@ -1511,7 +1511,7 @@ MULTIPOLYGON(
 
         <note><para>
         A partition of a polygon P is a set of polygons such that the interiors of the polygons do not intersect and the union of the polygons is equal to the interior of the original polygon P.
-        ST_ApproxConvexPartition and ST_GreeneApproxConvexPartition functions produce approximately optimal convex partitions. Both these functions produce convex decompositions by first decomposing the polygon into simpler polygons; ST_ApproxConvexPartition uses a triangulation and ST_GreeneApproxConvexPartition a monotone partition. These two functions both guarantee that they will produce no more than four times the optimal number of convex pieces but they differ in their runtime complexities. Though the triangulation-based approximation algorithm often results in fewer convex pieces, this is not always the case.
+        CG_ApproxConvexPartition and CG_GreeneApproxConvexPartition functions produce approximately optimal convex partitions. Both these functions produce convex decompositions by first decomposing the polygon into simpler polygons; CG_ApproxConvexPartition uses a triangulation and CG_GreeneApproxConvexPartition a monotone partition. These two functions both guarantee that they will produce no more than four times the optimal number of convex pieces but they differ in their runtime complexities. Though the triangulation-based approximation algorithm often results in fewer convex pieces, this is not always the case.
         </para></note>
 
 
@@ -1527,22 +1527,22 @@ MULTIPOLYGON(
         <imageobject>
           <imagedata fileref="images/st_approxconvexpartition01.png" />
         </imageobject>
-        <caption><para>Approximal Convex Partition (same example As <xref linkend="ST_YMonotonePartition" />,  <xref linkend="ST_GreeneApproxConvexPartition" /> and <xref linkend="ST_OptimalConvexPartition" />)</para></caption>
+        <caption><para>Approximal Convex Partition (same example As <xref linkend="CG_YMonotonePartition" />,  <xref linkend="CG_GreeneApproxConvexPartition" /> and <xref linkend="CG_OptimalConvexPartition" />)</para></caption>
       </mediaobject>
     </informalfigure>
-         <programlisting>SELECT ST_AsText(ST_ApproxConvexPartition('POLYGON((391 374, 240 431, 252 340, 374 320, 289 214, 134 390, 68 186, 154 259, 161 107, 435 108, 208 148, 295 160, 421 212, 441 303, 391 374))'::geometry));</programlisting>
+         <programlisting>SELECT ST_AsText(CG_ApproxConvexPartition('POLYGON((391 374, 240 431, 252 340, 374 320, 289 214, 134 390, 68 186, 154 259, 161 107, 435 108, 208 148, 295 160, 421 212, 441 303, 391 374))'::geometry));</programlisting>
           <screen>GEOMETRYCOLLECTION(POLYGON((391 374,240 431,252 340,374 320,391 374)),POLYGON((134 390,68 186,154 259,134 390)),POLYGON((289 214,134 390,154 259,289 214)),POLYGON((161 107,435 108,208 148,161 107)),POLYGON((154 259,161 107,208 148,154 259)),POLYGON((289 214,154 259,208 148,295 160,289 214)),POLYGON((374 320,289 214,295 160,421 212,374 320)),POLYGON((391 374,374 320,421 212,441 303,391 374)))</screen>
         </para>
 	  </refsection>
       <refsection>
 		<title>See Also</title>
-                <para><xref linkend="ST_YMonotonePartition" />, <xref linkend="ST_GreeneApproxConvexPartition" />, <xref linkend="ST_OptimalConvexPartition" /></para>
+                <para><xref linkend="CG_YMonotonePartition" />, <xref linkend="CG_GreeneApproxConvexPartition" />, <xref linkend="CG_OptimalConvexPartition" /></para>
 	  </refsection>
 
 	</refentry>
-<refentry xml:id="ST_GreeneApproxConvexPartition">
+<refentry xml:id="CG_GreeneApproxConvexPartition">
 	  <refnamediv>
-		<refname>ST_GreeneApproxConvexPartition</refname>
+		<refname>CG_GreeneApproxConvexPartition</refname>
 
 		<refpurpose>Computes approximal convex partition of the polygon geometry</refpurpose>
 	  </refnamediv>
@@ -1550,7 +1550,7 @@ MULTIPOLYGON(
 	  <refsynopsisdiv>
 		<funcsynopsis>
 		  <funcprototype>
-			<funcdef>geometry <function>ST_GreeneApproxConvexPartition</function></funcdef>
+			<funcdef>geometry <function>CG_GreeneApproxConvexPartition</function></funcdef>
 			<paramdef><type>geometry</type> <parameter>geom</parameter></paramdef>
 		  </funcprototype>
 		</funcsynopsis>
@@ -1564,7 +1564,7 @@ MULTIPOLYGON(
 
         <note><para>
         A partition of a polygon P is a set of polygons such that the interiors of the polygons do not intersect and the union of the polygons is equal to the interior of the original polygon P.
-        ST_ApproxConvexPartition and ST_GreeneApproxConvexPartition functions produce approximately optimal convex partitions. Both these functions produce convex decompositions by first decomposing the polygon into simpler polygons; ST_ApproxConvexPartition uses a triangulation and ST_GreeneApproxConvexPartition a monotone partition. These two functions both guarantee that they will produce no more than four times the optimal number of convex pieces but they differ in their runtime complexities. Though the triangulation-based approximation algorithm often results in fewer convex pieces, this is not always the case.
+        CG_ApproxConvexPartition and CG_GreeneApproxConvexPartition functions produce approximately optimal convex partitions. Both these functions produce convex decompositions by first decomposing the polygon into simpler polygons; CG_ApproxConvexPartition uses a triangulation and CG_GreeneApproxConvexPartition a monotone partition. These two functions both guarantee that they will produce no more than four times the optimal number of convex pieces but they differ in their runtime complexities. Though the triangulation-based approximation algorithm often results in fewer convex pieces, this is not always the case.
         </para></note>
 
 
@@ -1580,23 +1580,23 @@ MULTIPOLYGON(
         <imageobject>
           <imagedata fileref="images/st_greeneapproxconvexpartition01.png" />
         </imageobject>
-        <caption><para>Greene Approximal Convex Partition (same example As <xref linkend="ST_YMonotonePartition" />,  <xref linkend="ST_ApproxConvexPartition" /> and <xref linkend="ST_OptimalConvexPartition" />)</para></caption>
+        <caption><para>Greene Approximal Convex Partition (same example As <xref linkend="CG_YMonotonePartition" />,  <xref linkend="CG_ApproxConvexPartition" /> and <xref linkend="CG_OptimalConvexPartition" />)</para></caption>
       </mediaobject>
     </informalfigure>
-         <programlisting>SELECT ST_AsText(ST_GreeneApproxConvexPartition('POLYGON((391 374, 240 431, 252 340, 374 320, 289 214, 134 390, 68 186, 154 259, 161 107, 435 108, 208 148, 295 160, 421 212, 441 303, 391 374))'::geometry));</programlisting>
+         <programlisting>SELECT ST_AsText(CG_GreeneApproxConvexPartition('POLYGON((391 374, 240 431, 252 340, 374 320, 289 214, 134 390, 68 186, 154 259, 161 107, 435 108, 208 148, 295 160, 421 212, 441 303, 391 374))'::geometry));</programlisting>
           <screen>GEOMETRYCOLLECTION(POLYGON((134 390,68 186,154 259,134 390)),POLYGON((161 107,435 108,208 148,161 107)),POLYGON((208 148,295 160,421 212,289 214,208 148)),POLYGON((154 259,161 107,208 148,154 259)),POLYGON((289 214,134 390,154 259,208 148,289 214)),POLYGON((374 320,289 214,421 212,374 320)),POLYGON((374 320,421 212,441 303,391 374,374 320)),POLYGON((391 374,240 431,252 340,374 320,391 374)))</screen>
         </para>
 	  </refsection>
       <refsection>
 		<title>See Also</title>
-                <para><xref linkend="ST_YMonotonePartition" />, <xref linkend="ST_ApproxConvexPartition" />, <xref linkend="ST_OptimalConvexPartition" /></para>
+                <para><xref linkend="CG_YMonotonePartition" />, <xref linkend="CG_ApproxConvexPartition" />, <xref linkend="CG_OptimalConvexPartition" /></para>
 	  </refsection>
 
   </refentry>
 
-  <refentry xml:id="ST_OptimalConvexPartition">
+  <refentry xml:id="CG_OptimalConvexPartition">
 	  <refnamediv>
-		<refname>ST_OptimalConvexPartition</refname>
+		<refname>CG_OptimalConvexPartition</refname>
 
 		<refpurpose>Computes an optimal convex partition of the polygon geometry</refpurpose>
 	  </refnamediv>
@@ -1604,7 +1604,7 @@ MULTIPOLYGON(
 	  <refsynopsisdiv>
 		<funcsynopsis>
 		  <funcprototype>
-			<funcdef>geometry <function>ST_OptimalConvexPartition</function></funcdef>
+			<funcdef>geometry <function>CG_OptimalConvexPartition</function></funcdef>
 			<paramdef><type>geometry</type> <parameter>geom</parameter></paramdef>
 		  </funcprototype>
 		</funcsynopsis>
@@ -1618,7 +1618,7 @@ MULTIPOLYGON(
 
         <note><para>
         A partition of a polygon P is a set of polygons such that the interiors of the polygons do not intersect and the union of the polygons is equal to the interior of the original polygon P.
-        ST_OptimalConvexPartition produces a partition that is optimal in the number of pieces.
+        CG_OptimalConvexPartition produces a partition that is optimal in the number of pieces.
         </para></note>
 
 
@@ -1634,16 +1634,16 @@ MULTIPOLYGON(
         <imageobject>
           <imagedata fileref="images/st_optimalconvexpartition01.png" />
         </imageobject>
-        <caption><para>Optimal Convex Partition (same example As <xref linkend="ST_YMonotonePartition" />,  <xref linkend="ST_ApproxConvexPartition" /> and <xref linkend="ST_GreeneApproxConvexPartition" />)</para></caption>
+        <caption><para>Optimal Convex Partition (same example As <xref linkend="CG_YMonotonePartition" />,  <xref linkend="CG_ApproxConvexPartition" /> and <xref linkend="CG_GreeneApproxConvexPartition" />)</para></caption>
       </mediaobject>
     </informalfigure>
-         <programlisting>SELECT ST_AsText(ST_OptimalConvexPartition('POLYGON((391 374, 240 431, 252 340, 374 320, 289 214, 134 390, 68 186, 154 259, 161 107, 435 108, 208 148, 295 160, 421 212, 441 303, 391 374))'::geometry));</programlisting>
+         <programlisting>SELECT ST_AsText(CG_OptimalConvexPartition('POLYGON((391 374, 240 431, 252 340, 374 320, 289 214, 134 390, 68 186, 154 259, 161 107, 435 108, 208 148, 295 160, 421 212, 441 303, 391 374))'::geometry));</programlisting>
           <screen>GEOMETRYCOLLECTION(POLYGON((391 374,240 431,252 340,374 320,391 374)),POLYGON((134 390,68 186,154 259,134 390)),POLYGON((161 107,435 108,208 148,161 107)),POLYGON((154 259,161 107,208 148,154 259)),POLYGON((289 214,134 390,154 259,208 148,295 160,289 214)),POLYGON((374 320,289 214,295 160,421 212,441 303,374 320)),POLYGON((391 374,374 320,441 303,391 374)))</screen>
         </para>
 	  </refsection>
       <refsection>
 		<title>See Also</title>
-                <para><xref linkend="ST_YMonotonePartition" />, <xref linkend="ST_ApproxConvexPartition" />, <xref linkend="ST_GreeneApproxConvexPartition" /></para>
+                <para><xref linkend="CG_YMonotonePartition" />, <xref linkend="CG_ApproxConvexPartition" />, <xref linkend="CG_GreeneApproxConvexPartition" /></para>
 	  </refsection>
 
 	</refentry>
diff --git a/sfcgal/regress/partition.sql b/sfcgal/regress/partition.sql
index 631c5815c..ef6febe7a 100644
--- a/sfcgal/regress/partition.sql
+++ b/sfcgal/regress/partition.sql
@@ -1,12 +1,12 @@
 SELECT 'Y Monotone Partition',
-	ST_AsText(ST_YMonotonePartition('POLYGON((391 374, 240 431, 252 340, 374 320, 289 214, 134 390, 68 186, 154 259, 161 107, 435 108, 208 148, 295 160, 421 212, 441 303, 391 374))
+	ST_AsText(CG_YMonotonePartition('POLYGON((391 374, 240 431, 252 340, 374 320, 289 214, 134 390, 68 186, 154 259, 161 107, 435 108, 208 148, 295 160, 421 212, 441 303, 391 374))
 '));
 SELECT 'Approx Convex Partition',
-	ST_AsText(ST_ApproxConvexPartition('POLYGON((391 374, 240 431, 252 340, 374 320, 289 214, 134 390, 68 186, 154 259, 161 107, 435 108, 208 148, 295 160, 421 212, 441 303, 391 374))
+	ST_AsText(CG_ApproxConvexPartition('POLYGON((391 374, 240 431, 252 340, 374 320, 289 214, 134 390, 68 186, 154 259, 161 107, 435 108, 208 148, 295 160, 421 212, 441 303, 391 374))
 '));
 SELECT 'Greene Approx Convex Partition',
-	ST_AsText(ST_GreeneApproxConvexPartition('POLYGON((391 374, 240 431, 252 340, 374 320, 289 214, 134 390, 68 186, 154 259, 161 107, 435 108, 208 148, 295 160, 421 212, 441 303, 391 374))
+	ST_AsText(CG_GreeneApproxConvexPartition('POLYGON((391 374, 240 431, 252 340, 374 320, 289 214, 134 390, 68 186, 154 259, 161 107, 435 108, 208 148, 295 160, 421 212, 441 303, 391 374))
 '));
 SELECT 'Optimal Convex Partition',
-	ST_AsText(ST_OptimalConvexPartition('POLYGON((391 374, 240 431, 252 340, 374 320, 289 214, 134 390, 68 186, 154 259, 161 107, 435 108, 208 148, 295 160, 421 212, 441 303, 391 374))
+	ST_AsText(CG_OptimalConvexPartition('POLYGON((391 374, 240 431, 252 340, 374 320, 289 214, 134 390, 68 186, 154 259, 161 107, 435 108, 208 148, 295 160, 421 212, 441 303, 391 374))
 '));
diff --git a/sfcgal/sfcgal.sql.in b/sfcgal/sfcgal.sql.in
index a8a303fcd..54accb757 100644
--- a/sfcgal/sfcgal.sql.in
+++ b/sfcgal/sfcgal.sql.in
@@ -191,7 +191,7 @@ CREATE OR REPLACE FUNCTION ST_OptimalAlphaShape(g1 geometry, allow_holes boolean
 COMMIT;
 
 -- Availability: 3.4.0
-CREATE OR REPLACE FUNCTION ST_YMonotonePartition(g1 geometry)
+CREATE OR REPLACE FUNCTION CG_YMonotonePartition(g1 geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'sfcgal_ymonotonepartition'
        LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
@@ -199,7 +199,7 @@ CREATE OR REPLACE FUNCTION ST_YMonotonePartition(g1 geometry)
 COMMIT;
 
 -- Availability: 3.4.0
-CREATE OR REPLACE FUNCTION ST_ApproxConvexPartition(g1 geometry)
+CREATE OR REPLACE FUNCTION CG_ApproxConvexPartition(g1 geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'sfcgal_approxconvexpartition'
        LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
@@ -207,7 +207,7 @@ CREATE OR REPLACE FUNCTION ST_ApproxConvexPartition(g1 geometry)
 COMMIT;
 
 -- Availability: 3.4.0
-CREATE OR REPLACE FUNCTION ST_GreeneApproxConvexPartition(g1 geometry)
+CREATE OR REPLACE FUNCTION CG_GreeneApproxConvexPartition(g1 geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'sfcgal_greeneapproxconvexpartition'
        LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
@@ -215,7 +215,7 @@ CREATE OR REPLACE FUNCTION ST_GreeneApproxConvexPartition(g1 geometry)
 COMMIT;
 
 -- Availability: 3.4.0
-CREATE OR REPLACE FUNCTION ST_OptimalConvexPartition(g1 geometry)
+CREATE OR REPLACE FUNCTION CG_OptimalConvexPartition(g1 geometry)
        RETURNS geometry
        AS 'MODULE_PATHNAME', 'sfcgal_optimalconvexpartition'
        LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE

commit ee7e9e7a1a8070e7dd7831b930ebf79ad8884dee
Author: Loïc Bartoletti <loic.bartoletti at oslandia.com>
Date:   Fri May 12 08:57:41 2023 +0200

    SFCGAL: Add Partitions algorithms

diff --git a/NEWS b/NEWS
index f472eb1d2..4cc5c8ba4 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,8 @@
 PostGIS 3.5.0dev
 xxxx/xx/xx
 
+To take advantage of all SFCGAL featurs, SFCGAL 1.5.0+ is needed.
+
 * Breaking Changes *
 
   - #5546, TopoGeometry <> TopoGeometry is now ambiguous, to get
@@ -24,6 +26,7 @@ xxxx/xx/xx
   - #5055, add explicit <> geometry operator to prevent non-unique
            error with <> and != (Paul Ramsey)
   - Add ST_HasZ/ST_HasM (Loïc Bartoletti)
+  - postgis_sfcgal: ST_YMonotonePartition, ST_ApproxConvexPartition, ST_GreeneApproxConvexPartition and ST_OptimalConvexPartition (Loïc Bartoletti)
 
 * Enhancements *
 
diff --git a/doc/html/images/wkt/st_approxconvexpartition01.wkt b/doc/html/images/wkt/st_approxconvexpartition01.wkt
new file mode 100644
index 000000000..28465f09a
--- /dev/null
+++ b/doc/html/images/wkt/st_approxconvexpartition01.wkt
@@ -0,0 +1 @@
+Result;GEOMETRYCOLLECTION(POLYGON((391 374,240 431,252 340,374 320,391 374)),POLYGON((134 390,68 186,154 259,134 390)),POLYGON((289 214,134 390,154 259,289 214)),POLYGON((161 107,435 108,208 148,161 107)),POLYGON((154 259,161 107,208 148,154 259)),POLYGON((289 214,154 259,208 148,295 160,289 214)),POLYGON((374 320,289 214,295 160,421 212,374 320)),POLYGON((391 374,374 320,421 212,441 303,391 374)))
diff --git a/doc/html/images/wkt/st_greeneapproxconvexpartition01.wkt b/doc/html/images/wkt/st_greeneapproxconvexpartition01.wkt
new file mode 100644
index 000000000..45d39de83
--- /dev/null
+++ b/doc/html/images/wkt/st_greeneapproxconvexpartition01.wkt
@@ -0,0 +1 @@
+Result;GEOMETRYCOLLECTION(POLYGON((134 390,68 186,154 259,134 390)),POLYGON((161 107,435 108,208 148,161 107)),POLYGON((208 148,295 160,421 212,289 214,208 148)),POLYGON((154 259,161 107,208 148,154 259)),POLYGON((289 214,134 390,154 259,208 148,289 214)),POLYGON((374 320,289 214,421 212,374 320)),POLYGON((374 320,421 212,441 303,391 374,374 320)),POLYGON((391 374,240 431,252 340,374 320,391 374)))
diff --git a/doc/html/images/wkt/st_optimalconvexpartition01.wkt b/doc/html/images/wkt/st_optimalconvexpartition01.wkt
new file mode 100644
index 000000000..3d6c991c3
--- /dev/null
+++ b/doc/html/images/wkt/st_optimalconvexpartition01.wkt
@@ -0,0 +1 @@
+Result;GEOMETRYCOLLECTION(POLYGON((391 374,240 431,252 340,374 320,391 374)),POLYGON((134 390,68 186,154 259,134 390)),POLYGON((161 107,435 108,208 148,161 107)),POLYGON((154 259,161 107,208 148,154 259)),POLYGON((289 214,134 390,154 259,208 148,295 160,289 214)),POLYGON((374 320,289 214,295 160,421 212,441 303,374 320)),POLYGON((391 374,374 320,441 303,391 374)))
diff --git a/doc/html/images/wkt/st_ymonotonepartition01.wkt b/doc/html/images/wkt/st_ymonotonepartition01.wkt
new file mode 100644
index 000000000..4d513a53f
--- /dev/null
+++ b/doc/html/images/wkt/st_ymonotonepartition01.wkt
@@ -0,0 +1 @@
+Result;GEOMETRYCOLLECTION(POLYGON((134 390,68 186,154 259,134 390)),POLYGON((289 214,134 390,154 259,161 107,435 108,208 148,295 160,421 212,289 214)),POLYGON((391 374,240 431,252 340,374 320,289 214,421 212,441 303,391 374)))
diff --git a/doc/reference_sfcgal.xml b/doc/reference_sfcgal.xml
index 090723828..08eded571 100644
--- a/doc/reference_sfcgal.xml
+++ b/doc/reference_sfcgal.xml
@@ -1433,5 +1433,218 @@ MULTIPOLYGON(
 
 	</refentry>
 
+    <refentry xml:id="ST_YMonotonePartition">
+	  <refnamediv>
+		<refname>ST_YMonotonePartition</refname>
 
+		<refpurpose>Computes y-monotone partition of the polygon geometry</refpurpose>
+	  </refnamediv>
+
+	  <refsynopsisdiv>
+		<funcsynopsis>
+		  <funcprototype>
+			<funcdef>geometry <function>ST_YMonotonePartition</function></funcdef>
+			<paramdef><type>geometry</type> <parameter>geom</parameter></paramdef>
+		  </funcprototype>
+		</funcsynopsis>
+	  </refsynopsisdiv>
+
+	  <refsection>
+        <title>Description</title>
+
+          <para>Computes y-monotone partition of the polygon geometry.
+          </para>
+
+        <note><para>
+        A partition of a polygon P is a set of polygons such that the interiors of the polygons do not intersect and the union of the polygons is equal to the interior of the original polygon P.
+        A y-monotone polygon is a polygon whose vertices v1,…,vn can be divided into two chains v1,…,vk and vk,…,vn,v1, such that any horizontal line intersects either chain at most once. This algorithm does not guarantee a bound on the number of polygons produced with respect to the optimal number.
+        </para></note>
+
+
+		<para>Availability: 3.4.0 - requires SFCGAL >= 1.5.0.</para>
+		<para>&sfcgal_required;</para>
+	  </refsection>
+
+	  <refsection>
+	      <title>Examples</title>
+<para>
+    <informalfigure>
+      <mediaobject>
+        <imageobject>
+          <imagedata fileref="images/st_ymonotonepartition01.png" />
+        </imageobject>
+        <caption><para>Y-Monotone Partition (same example As <xref linkend="ST_ApproxConvexPartition" />,  <xref linkend="ST_GreeneApproxConvexPartition" /> and <xref linkend="ST_OptimalConvexPartition" />)</para></caption>
+      </mediaobject>
+    </informalfigure>
+         <programlisting>SELECT ST_AsText(ST_YMonotonePartition('POLYGON((391 374, 240 431, 252 340, 374 320, 289 214, 134 390, 68 186, 154 259, 161 107, 435 108, 208 148, 295 160, 421 212, 441 303, 391 374))'::geometry));</programlisting>
+          <screen>GEOMETRYCOLLECTION(POLYGON((134 390,68 186,154 259,134 390)),POLYGON((289 214,134 390,154 259,161 107,435 108,208 148,295 160,421 212,289 214)),POLYGON((391 374,240 431,252 340,374 320,289 214,421 212,441 303,391 374)))</screen>
+        </para>
+	  </refsection>
+      <refsection>
+		<title>See Also</title>
+                <para><xref linkend="ST_ApproxConvexPartition" />, <xref linkend="ST_GreeneApproxConvexPartition" />, <xref linkend="ST_OptimalConvexPartition" /></para>
+	  </refsection>
+
+	</refentry>
+
+<refentry xml:id="ST_ApproxConvexPartition">
+	  <refnamediv>
+		<refname>ST_ApproxConvexPartition</refname>
+
+		<refpurpose>Computes approximal convex partition of the polygon geometry</refpurpose>
+	  </refnamediv>
+
+	  <refsynopsisdiv>
+		<funcsynopsis>
+		  <funcprototype>
+			<funcdef>geometry <function>ST_ApproxConvexPartition</function></funcdef>
+			<paramdef><type>geometry</type> <parameter>geom</parameter></paramdef>
+		  </funcprototype>
+		</funcsynopsis>
+	  </refsynopsisdiv>
+
+	  <refsection>
+        <title>Description</title>
+
+          <para>Computes approximal convex partition of the polygon geometry (using a triangulation).
+          </para>
+
+        <note><para>
+        A partition of a polygon P is a set of polygons such that the interiors of the polygons do not intersect and the union of the polygons is equal to the interior of the original polygon P.
+        ST_ApproxConvexPartition and ST_GreeneApproxConvexPartition functions produce approximately optimal convex partitions. Both these functions produce convex decompositions by first decomposing the polygon into simpler polygons; ST_ApproxConvexPartition uses a triangulation and ST_GreeneApproxConvexPartition a monotone partition. These two functions both guarantee that they will produce no more than four times the optimal number of convex pieces but they differ in their runtime complexities. Though the triangulation-based approximation algorithm often results in fewer convex pieces, this is not always the case.
+        </para></note>
+
+
+		<para>Availability: 3.4.0 - requires SFCGAL >= 1.5.0.</para>
+		<para>&sfcgal_required;</para>
+	  </refsection>
+
+	  <refsection>
+	      <title>Examples</title>
+<para>
+    <informalfigure>
+      <mediaobject>
+        <imageobject>
+          <imagedata fileref="images/st_approxconvexpartition01.png" />
+        </imageobject>
+        <caption><para>Approximal Convex Partition (same example As <xref linkend="ST_YMonotonePartition" />,  <xref linkend="ST_GreeneApproxConvexPartition" /> and <xref linkend="ST_OptimalConvexPartition" />)</para></caption>
+      </mediaobject>
+    </informalfigure>
+         <programlisting>SELECT ST_AsText(ST_ApproxConvexPartition('POLYGON((391 374, 240 431, 252 340, 374 320, 289 214, 134 390, 68 186, 154 259, 161 107, 435 108, 208 148, 295 160, 421 212, 441 303, 391 374))'::geometry));</programlisting>
+          <screen>GEOMETRYCOLLECTION(POLYGON((391 374,240 431,252 340,374 320,391 374)),POLYGON((134 390,68 186,154 259,134 390)),POLYGON((289 214,134 390,154 259,289 214)),POLYGON((161 107,435 108,208 148,161 107)),POLYGON((154 259,161 107,208 148,154 259)),POLYGON((289 214,154 259,208 148,295 160,289 214)),POLYGON((374 320,289 214,295 160,421 212,374 320)),POLYGON((391 374,374 320,421 212,441 303,391 374)))</screen>
+        </para>
+	  </refsection>
+      <refsection>
+		<title>See Also</title>
+                <para><xref linkend="ST_YMonotonePartition" />, <xref linkend="ST_GreeneApproxConvexPartition" />, <xref linkend="ST_OptimalConvexPartition" /></para>
+	  </refsection>
+
+	</refentry>
+<refentry xml:id="ST_GreeneApproxConvexPartition">
+	  <refnamediv>
+		<refname>ST_GreeneApproxConvexPartition</refname>
+
+		<refpurpose>Computes approximal convex partition of the polygon geometry</refpurpose>
+	  </refnamediv>
+
+	  <refsynopsisdiv>
+		<funcsynopsis>
+		  <funcprototype>
+			<funcdef>geometry <function>ST_GreeneApproxConvexPartition</function></funcdef>
+			<paramdef><type>geometry</type> <parameter>geom</parameter></paramdef>
+		  </funcprototype>
+		</funcsynopsis>
+	  </refsynopsisdiv>
+
+	  <refsection>
+        <title>Description</title>
+
+          <para>Computes approximal monotone convex partition of the polygon geometry.
+          </para>
+
+        <note><para>
+        A partition of a polygon P is a set of polygons such that the interiors of the polygons do not intersect and the union of the polygons is equal to the interior of the original polygon P.
+        ST_ApproxConvexPartition and ST_GreeneApproxConvexPartition functions produce approximately optimal convex partitions. Both these functions produce convex decompositions by first decomposing the polygon into simpler polygons; ST_ApproxConvexPartition uses a triangulation and ST_GreeneApproxConvexPartition a monotone partition. These two functions both guarantee that they will produce no more than four times the optimal number of convex pieces but they differ in their runtime complexities. Though the triangulation-based approximation algorithm often results in fewer convex pieces, this is not always the case.
+        </para></note>
+
+
+		<para>Availability: 3.4.0 - requires SFCGAL >= 1.5.0.</para>
+		<para>&sfcgal_required;</para>
+	  </refsection>
+
+	  <refsection>
+	      <title>Examples</title>
+<para>
+    <informalfigure>
+      <mediaobject>
+        <imageobject>
+          <imagedata fileref="images/st_greeneapproxconvexpartition01.png" />
+        </imageobject>
+        <caption><para>Greene Approximal Convex Partition (same example As <xref linkend="ST_YMonotonePartition" />,  <xref linkend="ST_ApproxConvexPartition" /> and <xref linkend="ST_OptimalConvexPartition" />)</para></caption>
+      </mediaobject>
+    </informalfigure>
+         <programlisting>SELECT ST_AsText(ST_GreeneApproxConvexPartition('POLYGON((391 374, 240 431, 252 340, 374 320, 289 214, 134 390, 68 186, 154 259, 161 107, 435 108, 208 148, 295 160, 421 212, 441 303, 391 374))'::geometry));</programlisting>
+          <screen>GEOMETRYCOLLECTION(POLYGON((134 390,68 186,154 259,134 390)),POLYGON((161 107,435 108,208 148,161 107)),POLYGON((208 148,295 160,421 212,289 214,208 148)),POLYGON((154 259,161 107,208 148,154 259)),POLYGON((289 214,134 390,154 259,208 148,289 214)),POLYGON((374 320,289 214,421 212,374 320)),POLYGON((374 320,421 212,441 303,391 374,374 320)),POLYGON((391 374,240 431,252 340,374 320,391 374)))</screen>
+        </para>
+	  </refsection>
+      <refsection>
+		<title>See Also</title>
+                <para><xref linkend="ST_YMonotonePartition" />, <xref linkend="ST_ApproxConvexPartition" />, <xref linkend="ST_OptimalConvexPartition" /></para>
+	  </refsection>
+
+  </refentry>
+
+  <refentry xml:id="ST_OptimalConvexPartition">
+	  <refnamediv>
+		<refname>ST_OptimalConvexPartition</refname>
+
+		<refpurpose>Computes an optimal convex partition of the polygon geometry</refpurpose>
+	  </refnamediv>
+
+	  <refsynopsisdiv>
+		<funcsynopsis>
+		  <funcprototype>
+			<funcdef>geometry <function>ST_OptimalConvexPartition</function></funcdef>
+			<paramdef><type>geometry</type> <parameter>geom</parameter></paramdef>
+		  </funcprototype>
+		</funcsynopsis>
+	  </refsynopsisdiv>
+
+	  <refsection>
+        <title>Description</title>
+
+          <para>Computes an optimal convex partition of the polygon geometry.
+          </para>
+
+        <note><para>
+        A partition of a polygon P is a set of polygons such that the interiors of the polygons do not intersect and the union of the polygons is equal to the interior of the original polygon P.
+        ST_OptimalConvexPartition produces a partition that is optimal in the number of pieces.
+        </para></note>
+
+
+		<para>Availability: 3.4.0 - requires SFCGAL >= 1.5.0.</para>
+		<para>&sfcgal_required;</para>
+	  </refsection>
+
+	  <refsection>
+	      <title>Examples</title>
+<para>
+    <informalfigure>
+      <mediaobject>
+        <imageobject>
+          <imagedata fileref="images/st_optimalconvexpartition01.png" />
+        </imageobject>
+        <caption><para>Optimal Convex Partition (same example As <xref linkend="ST_YMonotonePartition" />,  <xref linkend="ST_ApproxConvexPartition" /> and <xref linkend="ST_GreeneApproxConvexPartition" />)</para></caption>
+      </mediaobject>
+    </informalfigure>
+         <programlisting>SELECT ST_AsText(ST_OptimalConvexPartition('POLYGON((391 374, 240 431, 252 340, 374 320, 289 214, 134 390, 68 186, 154 259, 161 107, 435 108, 208 148, 295 160, 421 212, 441 303, 391 374))'::geometry));</programlisting>
+          <screen>GEOMETRYCOLLECTION(POLYGON((391 374,240 431,252 340,374 320,391 374)),POLYGON((134 390,68 186,154 259,134 390)),POLYGON((161 107,435 108,208 148,161 107)),POLYGON((154 259,161 107,208 148,154 259)),POLYGON((289 214,134 390,154 259,208 148,295 160,289 214)),POLYGON((374 320,289 214,295 160,421 212,441 303,374 320)),POLYGON((391 374,374 320,441 303,391 374)))</screen>
+        </para>
+	  </refsection>
+      <refsection>
+		<title>See Also</title>
+                <para><xref linkend="ST_YMonotonePartition" />, <xref linkend="ST_ApproxConvexPartition" />, <xref linkend="ST_GreeneApproxConvexPartition" /></para>
+	  </refsection>
+
+	</refentry>
 </section>
diff --git a/sfcgal/lwgeom_sfcgal.c b/sfcgal/lwgeom_sfcgal.c
index e85e7ee9a..10742c9d5 100644
--- a/sfcgal/lwgeom_sfcgal.c
+++ b/sfcgal/lwgeom_sfcgal.c
@@ -733,3 +733,131 @@ Datum sfcgal_optimalalphashape(PG_FUNCTION_ARGS)
 #endif
 }
 
+PG_FUNCTION_INFO_V1(sfcgal_ymonotonepartition);
+Datum sfcgal_ymonotonepartition(PG_FUNCTION_ARGS)
+{
+#if POSTGIS_SFCGAL_VERSION < 10500
+  lwpgerror("The SFCGAL version this PostGIS binary "
+	          "was compiled against (%d) doesn't support "
+	          "'sfcgal_y_monotone_partition_2' function (1.5.0+ required)",
+	          POSTGIS_SFCGAL_VERSION);
+	          PG_RETURN_NULL();
+#else /* POSTGIS_SFCGAL_VERSION >= 10500 */
+	GSERIALIZED *input, *output;
+	sfcgal_geometry_t *geom;
+	sfcgal_geometry_t *result;
+	srid_t srid;
+
+	sfcgal_postgis_init();
+
+	input = PG_GETARG_GSERIALIZED_P(0);
+	srid = gserialized_get_srid(input);
+	geom = POSTGIS2SFCGALGeometry(input);
+	PG_FREE_IF_COPY(input, 0);
+
+	result = sfcgal_y_monotone_partition_2(geom);
+	sfcgal_geometry_delete(geom);
+
+	output = SFCGALGeometry2POSTGIS(result, 0, srid);
+	sfcgal_geometry_delete(result);
+
+	PG_RETURN_POINTER(output);
+#endif
+}
+
+PG_FUNCTION_INFO_V1(sfcgal_approxconvexpartition);
+Datum sfcgal_approxconvexpartition(PG_FUNCTION_ARGS)
+{
+#if POSTGIS_SFCGAL_VERSION < 10500
+  lwpgerror("The SFCGAL version this PostGIS binary "
+	          "was compiled against (%d) doesn't support "
+	          "'sfcgal_approx_convex_partition_2' function (1.5.0+ required)",
+	          POSTGIS_SFCGAL_VERSION);
+	          PG_RETURN_NULL();
+#else /* POSTGIS_SFCGAL_VERSION >= 10500 */
+	GSERIALIZED *input, *output;
+	sfcgal_geometry_t *geom;
+	sfcgal_geometry_t *result;
+	srid_t srid;
+
+	sfcgal_postgis_init();
+
+	input = PG_GETARG_GSERIALIZED_P(0);
+	srid = gserialized_get_srid(input);
+	geom = POSTGIS2SFCGALGeometry(input);
+	PG_FREE_IF_COPY(input, 0);
+
+	result = sfcgal_approx_convex_partition_2(geom);
+	sfcgal_geometry_delete(geom);
+
+	output = SFCGALGeometry2POSTGIS(result, 0, srid);
+	sfcgal_geometry_delete(result);
+
+	PG_RETURN_POINTER(output);
+#endif
+}
+
+PG_FUNCTION_INFO_V1(sfcgal_greeneapproxconvexpartition);
+Datum sfcgal_greeneapproxconvexpartition(PG_FUNCTION_ARGS)
+{
+#if POSTGIS_SFCGAL_VERSION < 10500
+  lwpgerror("The SFCGAL version this PostGIS binary "
+	          "was compiled against (%d) doesn't support "
+	          "'sfcgal_greene_approx_convex_partition_2' function (1.5.0+ required)",
+	          POSTGIS_SFCGAL_VERSION);
+	          PG_RETURN_NULL();
+#else /* POSTGIS_SFCGAL_VERSION >= 10500 */
+	GSERIALIZED *input, *output;
+	sfcgal_geometry_t *geom;
+	sfcgal_geometry_t *result;
+	srid_t srid;
+
+	sfcgal_postgis_init();
+
+	input = PG_GETARG_GSERIALIZED_P(0);
+	srid = gserialized_get_srid(input);
+	geom = POSTGIS2SFCGALGeometry(input);
+	PG_FREE_IF_COPY(input, 0);
+
+	result = sfcgal_greene_approx_convex_partition_2(geom);
+	sfcgal_geometry_delete(geom);
+
+	output = SFCGALGeometry2POSTGIS(result, 0, srid);
+	sfcgal_geometry_delete(result);
+
+	PG_RETURN_POINTER(output);
+#endif
+}
+
+PG_FUNCTION_INFO_V1(sfcgal_optimalconvexpartition);
+Datum sfcgal_optimalconvexpartition(PG_FUNCTION_ARGS)
+{
+#if POSTGIS_SFCGAL_VERSION < 10500
+  lwpgerror("The SFCGAL version this PostGIS binary "
+	          "was compiled against (%d) doesn't support "
+	          "'sfcgal_optimal_convex_partition_2' function (1.5.0+ required)",
+	          POSTGIS_SFCGAL_VERSION);
+	          PG_RETURN_NULL();
+#else /* POSTGIS_SFCGAL_VERSION >= 10500 */
+	GSERIALIZED *input, *output;
+	sfcgal_geometry_t *geom;
+	sfcgal_geometry_t *result;
+	srid_t srid;
+
+	sfcgal_postgis_init();
+
+	input = PG_GETARG_GSERIALIZED_P(0);
+	srid = gserialized_get_srid(input);
+	geom = POSTGIS2SFCGALGeometry(input);
+	PG_FREE_IF_COPY(input, 0);
+
+	result = sfcgal_optimal_convex_partition_2(geom);
+	sfcgal_geometry_delete(geom);
+
+	output = SFCGALGeometry2POSTGIS(result, 0, srid);
+	sfcgal_geometry_delete(result);
+
+	PG_RETURN_POINTER(output);
+#endif
+}
+
diff --git a/sfcgal/lwgeom_sfcgal.h b/sfcgal/lwgeom_sfcgal.h
index 84438c94c..71f1608a3 100644
--- a/sfcgal/lwgeom_sfcgal.h
+++ b/sfcgal/lwgeom_sfcgal.h
@@ -52,6 +52,11 @@ Datum sfcgal_is_solid(PG_FUNCTION_ARGS);
 Datum sfcgal_convexhull3D(PG_FUNCTION_ARGS);
 Datum sfcgal_alphashape(PG_FUNCTION_ARGS);
 Datum sfcgal_optimalalphashape(PG_FUNCTION_ARGS);
+Datum sfcgal_optimalalphashape(PG_FUNCTION_ARGS);
+Datum sfcgal_ymonotonepartition(PG_FUNCTION_ARGS);
+Datum sfcgal_approxconvexpartition(PG_FUNCTION_ARGS);
+Datum sfcgal_greeneapproxconvexpartition(PG_FUNCTION_ARGS);
+Datum sfcgal_optimalconvexpartition(PG_FUNCTION_ARGS);
 
 /* Initialize sfcgal with PostGIS error handlers */
 void sfcgal_postgis_init(void);
diff --git a/sfcgal/regress/partition.sql b/sfcgal/regress/partition.sql
new file mode 100644
index 000000000..631c5815c
--- /dev/null
+++ b/sfcgal/regress/partition.sql
@@ -0,0 +1,12 @@
+SELECT 'Y Monotone Partition',
+	ST_AsText(ST_YMonotonePartition('POLYGON((391 374, 240 431, 252 340, 374 320, 289 214, 134 390, 68 186, 154 259, 161 107, 435 108, 208 148, 295 160, 421 212, 441 303, 391 374))
+'));
+SELECT 'Approx Convex Partition',
+	ST_AsText(ST_ApproxConvexPartition('POLYGON((391 374, 240 431, 252 340, 374 320, 289 214, 134 390, 68 186, 154 259, 161 107, 435 108, 208 148, 295 160, 421 212, 441 303, 391 374))
+'));
+SELECT 'Greene Approx Convex Partition',
+	ST_AsText(ST_GreeneApproxConvexPartition('POLYGON((391 374, 240 431, 252 340, 374 320, 289 214, 134 390, 68 186, 154 259, 161 107, 435 108, 208 148, 295 160, 421 212, 441 303, 391 374))
+'));
+SELECT 'Optimal Convex Partition',
+	ST_AsText(ST_OptimalConvexPartition('POLYGON((391 374, 240 431, 252 340, 374 320, 289 214, 134 390, 68 186, 154 259, 161 107, 435 108, 208 148, 295 160, 421 212, 441 303, 391 374))
+'));
diff --git a/sfcgal/regress/partition_expected b/sfcgal/regress/partition_expected
new file mode 100644
index 000000000..8d13fe6b2
--- /dev/null
+++ b/sfcgal/regress/partition_expected
@@ -0,0 +1,4 @@
+Y Monotone Partition|GEOMETRYCOLLECTION(POLYGON((134 390,68 186,154 259,134 390)),POLYGON((289 214,134 390,154 259,161 107,435 108,208 148,295 160,421 212,289 214)),POLYGON((391 374,240 431,252 340,374 320,289 214,421 212,441 303,391 374)))
+Approx Convex Partition|GEOMETRYCOLLECTION(POLYGON((391 374,240 431,252 340,374 320,391 374)),POLYGON((134 390,68 186,154 259,134 390)),POLYGON((289 214,134 390,154 259,289 214)),POLYGON((161 107,435 108,208 148,161 107)),POLYGON((154 259,161 107,208 148,154 259)),POLYGON((289 214,154 259,208 148,295 160,289 214)),POLYGON((374 320,289 214,295 160,421 212,374 320)),POLYGON((391 374,374 320,421 212,441 303,391 374)))
+Greene Approx Convex Partition|GEOMETRYCOLLECTION(POLYGON((134 390,68 186,154 259,134 390)),POLYGON((161 107,435 108,208 148,161 107)),POLYGON((208 148,295 160,421 212,289 214,208 148)),POLYGON((154 259,161 107,208 148,154 259)),POLYGON((289 214,134 390,154 259,208 148,289 214)),POLYGON((374 320,289 214,421 212,374 320)),POLYGON((374 320,421 212,441 303,391 374,374 320)),POLYGON((391 374,240 431,252 340,374 320,391 374)))
+Optimal Convex Partition|GEOMETRYCOLLECTION(POLYGON((391 374,240 431,252 340,374 320,391 374)),POLYGON((134 390,68 186,154 259,134 390)),POLYGON((161 107,435 108,208 148,161 107)),POLYGON((154 259,161 107,208 148,154 259)),POLYGON((289 214,134 390,154 259,208 148,295 160,289 214)),POLYGON((374 320,289 214,295 160,421 212,441 303,374 320)),POLYGON((391 374,374 320,441 303,391 374)))
diff --git a/sfcgal/regress/tests.mk.in b/sfcgal/regress/tests.mk.in
index 92d969f92..aef48abab 100644
--- a/sfcgal/regress/tests.mk.in
+++ b/sfcgal/regress/tests.mk.in
@@ -21,3 +21,8 @@ ifeq ($(shell expr "$(POSTGIS_SFCGAL_VERSION)" ">=" 10401),1)
 	TESTS += \
 		$(top_srcdir)/sfcgal/regress/alphashape.sql
 endif
+
+ifeq ($(shell expr "$(POSTGIS_SFCGAL_VERSION)" ">=" 10500),1)
+	TESTS += \
+		$(top_srcdir)/sfcgal/regress/partition.sql
+endif
diff --git a/sfcgal/sfcgal.sql.in b/sfcgal/sfcgal.sql.in
index 2466545ba..a8a303fcd 100644
--- a/sfcgal/sfcgal.sql.in
+++ b/sfcgal/sfcgal.sql.in
@@ -189,3 +189,36 @@ CREATE OR REPLACE FUNCTION ST_OptimalAlphaShape(g1 geometry, allow_holes boolean
        LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
        COST 100;
 COMMIT;
+
+-- Availability: 3.4.0
+CREATE OR REPLACE FUNCTION ST_YMonotonePartition(g1 geometry)
+       RETURNS geometry
+       AS 'MODULE_PATHNAME', 'sfcgal_ymonotonepartition'
+       LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
+       COST 100;
+COMMIT;
+
+-- Availability: 3.4.0
+CREATE OR REPLACE FUNCTION ST_ApproxConvexPartition(g1 geometry)
+       RETURNS geometry
+       AS 'MODULE_PATHNAME', 'sfcgal_approxconvexpartition'
+       LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
+       COST 100;
+COMMIT;
+
+-- Availability: 3.4.0
+CREATE OR REPLACE FUNCTION ST_GreeneApproxConvexPartition(g1 geometry)
+       RETURNS geometry
+       AS 'MODULE_PATHNAME', 'sfcgal_greeneapproxconvexpartition'
+       LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
+       COST 100;
+COMMIT;
+
+-- Availability: 3.4.0
+CREATE OR REPLACE FUNCTION ST_OptimalConvexPartition(g1 geometry)
+       RETURNS geometry
+       AS 'MODULE_PATHNAME', 'sfcgal_optimalconvexpartition'
+       LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE
+       COST 100;
+COMMIT;
+

commit 2104514430c4e62c22f598aeade299ebe788cd65
Author: Regina Obe <lr at pcorp.us>
Date:   Mon Nov 13 02:41:17 2023 -0500

    DOC and XSL changes
    
     - Up latest release of geos
     - minor cleanup of raster garden xsl, still has issues

diff --git a/doc/postgis.xml b/doc/postgis.xml
index 475c8921a..4b415c57d 100644
--- a/doc/postgis.xml
+++ b/doc/postgis.xml
@@ -13,7 +13,7 @@
 
 <!-- Change these values to update the version numbers referenced within the documentation -->
 <!ENTITY last_proj_release_version "9.2.1">
-<!ENTITY last_geos_release_version "3.12.0">
+<!ENTITY last_geos_release_version "3.12.1">
 <!ENTITY min_geos_version "3.8.0">
 <!ENTITY min_postgres_version "12">
 <!ENTITY max_postgres_version "17">
diff --git a/doc/xsl/raster_gardentest.sql.xsl b/doc/xsl/raster_gardentest.sql.xsl
index 1565dc041..03fab2c1b 100644
--- a/doc/xsl/raster_gardentest.sql.xsl
+++ b/doc/xsl/raster_gardentest.sql.xsl
@@ -375,12 +375,12 @@ SELECT  'Ending <xsl:value-of select="db:funcdef/db:function" />(<xsl:value-of s
 					  <xsl:when test="$numparamgeoms > '0'">
 						SELECT '<xsl:value-of select="$fnname" /><xsl:text> </xsl:text><xsl:value-of select="@ID" />(<xsl:value-of select="$fnargs" />): Start Testing <xsl:value-of select="$pix1type" />, <xsl:value-of select="@GeometryType" />';
 			<!-- If input is geometry show ewkt rep -->
-			  <xsl:if test="contains(funcdef, 'raster ') or contains(funcdef, 'geometry ')">
+			  <xsl:if test="contains(db:funcdef, 'raster ') or contains(db:funcdef, 'geometry ')">
 	 <!-- If output is raster or geometry show ewkt convexhull rep -->
 			SELECT ST_ConvexHull(<xsl:value-of select="$fnname" />(<xsl:value-of select="$fnfakeparams" />) )
 			</xsl:if>
 	<!-- else just output it -->
-			<xsl:if test="not(contains(funcdef, 'raster ') or contains(funcdef, 'geometry ') )">
+			<xsl:if test="not(contains(db:funcdef, 'raster ') or contains(db:funcdef, 'geometry ') )">
 		SELECT <xsl:value-of select="$fnname" />(<xsl:value-of select="$fnfakeparams" />)
 			</xsl:if>
 			, ST_AsEWKT(rast1.rast::geometry) As ref1_geom, ST_AsEWKT(rast2.rast::geometry) As ref2_geom
@@ -558,8 +558,8 @@ SELECT '<xsl:value-of select="$fnname" /><xsl:text> </xsl:text><xsl:value-of sel
 			<xsl:if test="count(db:paramdef/parameter) > 0"> </xsl:if>
 			<xsl:for-each select="db:paramdef">
 				<xsl:choose>
-					<xsl:when test="count(parameter) > 0">
-						<xsl:value-of select="parameter" />
+					<xsl:when test="count(db:paramdef/parameter) > 0">
+						<xsl:value-of select="db:paramdef/parameter" />
 					</xsl:when>
 				</xsl:choose>
 				<xsl:if test="position()<last()"><xsl:text>, </xsl:text></xsl:if>

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

Summary of changes:
 NEWS                                               |   3 +
 doc/html/images/wkt/st_approxconvexpartition01.wkt |   1 +
 .../wkt/st_greeneapproxconvexpartition01.wkt       |   1 +
 .../images/wkt/st_optimalconvexpartition01.wkt     |   1 +
 doc/html/images/wkt/st_ymonotonepartition01.wkt    |   1 +
 doc/postgis.xml                                    |   2 +-
 doc/reference_sfcgal.xml                           | 213 +++++++++++++++++++++
 doc/xsl/raster_gardentest.sql.xsl                  |   8 +-
 sfcgal/lwgeom_sfcgal.c                             | 128 +++++++++++++
 sfcgal/lwgeom_sfcgal.h                             |   5 +
 sfcgal/regress/partition.sql                       |  12 ++
 sfcgal/regress/partition_expected                  |   4 +
 sfcgal/regress/tests.mk.in                         |   5 +
 sfcgal/sfcgal.sql.in                               |  33 ++++
 14 files changed, 412 insertions(+), 5 deletions(-)
 create mode 100644 doc/html/images/wkt/st_approxconvexpartition01.wkt
 create mode 100644 doc/html/images/wkt/st_greeneapproxconvexpartition01.wkt
 create mode 100644 doc/html/images/wkt/st_optimalconvexpartition01.wkt
 create mode 100644 doc/html/images/wkt/st_ymonotonepartition01.wkt
 create mode 100644 sfcgal/regress/partition.sql
 create mode 100644 sfcgal/regress/partition_expected


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list