[postgis-tickets] [SCM] PostGIS branch master updated. 3.3.0rc2-565-ga27677b66
git at osgeo.org
git at osgeo.org
Wed Jan 25 13:39:28 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 a27677b660239589bfa4e090e0f04fac1f235f38 (commit)
from 708a686b295ee25d8b2a4b8990e87e6a542512a4 (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 a27677b660239589bfa4e090e0f04fac1f235f38
Author: Martin Davis <mtnclimb at gmail.com>
Date: Wed Jan 25 13:43:33 2023 -0800
Improve doc for CGAL alpha shapes
diff --git a/doc/html/image_src/st_alphashape01.wkt b/doc/html/image_src/st_alphashape01.wkt
index 3db13ff1e..7887a7dfc 100644
--- a/doc/html/image_src/st_alphashape01.wkt
+++ b/doc/html/image_src/st_alphashape01.wkt
@@ -1,2 +1,2 @@
-Result;POLYGON((89 53,91 50,87 42,90 30,88 29,84 19,78 16,73 16,65 16,53 18,43 19,37 23,30 22,28 33,23 36,26 44,27 54,23 60,24 67,27 77,24 82,26 85,34 86,39 88,45 90,49 95,52 98,57 97,64 97,72 95,76 88,75 84,83 72,85 71,88 58,89 53))
-ArgA-thin;MULTIPOINT((63 84),(76 88),(68 73),(53 18),(91 50),(81 70),(88 29),(24 82),(32 51),(37 23),(27 54),(84 19),(75 87),(44 42),(77 67),(90 30),(36 61),(32 65),(81 47),(88 58),(68 73),(49 95),(81 60),(87 50),(78 16),(79 21),(30 22),(78 43),(26 85),(48 34),(35 35),(36 40),(31 79),(83 29),(27 84),(52 98),(72 95),(85 71),(75 84),(75 77),(81 29),(77 73),(41 42),(83 72),(23 36),(89 53),(27 57),(57 97),(27 77),(39 88),(60 81),(80 72),(54 32),(55 26),(62 22),(70 20),(76 27),(84 35),(87 42),(82 54),(83 64),(69 86),(60 90),(50 86),(43 80),(36 73),(36 68),(40 75),(24 67),(23 60),(26 44),(28 33),(40 32),(43 19),(65 16),(73 16),(38 46),(31 59),(34 86),(45 90),(64 97))
+Result;POLYGON((134 80,136 75,130 63,135 45,132 44,126 28,117 24,110 24,98 24,80 27,64 28,56 34,45 33,42 50,34 54,39 66,40 81,34 90,36 100,40 116,36 123,39 128,51 129,58 132,68 135,74 142,78 147,86 146,96 146,108 142,114 132,112 126,112 116,125 108,128 106,125 96,132 87,134 80))
+ArgA-thin;MULTIPOINT((94 126),(114 132),(102 110),(80 27),(136 75),(122 105),(132 44),(36 123),(48 76),(56 34),(40 81),(126 28),(112 130),(66 63),(116 100),(135 45),(54 92),(48 98),(122 70),(132 87),(102 110),(74 142),(122 90),(130 75),(117 24),(118 32),(45 33),(117 64),(39 128),(72 51),(52 52),(54 60),(46 118),(125 44),(40 126),(78 147),(108 142),(128 106),(112 126),(112 116),(122 44),(116 110),(61 63),(125 108),(34 54),(134 80),(40 86),(86 146),(40 116),(58 132),(90 122),(120 108),(81 48),(82 39),(93 33),(105 30),(114 40),(126 52),(130 63),(123 81),(125 96),(104 129),(90 135),(75 129),(64 120),(54 110),(54 102),(60 112),(36 100),(34 90),(39 66),(42 50),(60 48),(64 28),(98 24),(110 24),(57 69),(46 88),(51 129),(68 135),(96 146))
diff --git a/doc/reference_sfcgal.xml b/doc/reference_sfcgal.xml
index e7c8eb78c..5e394158a 100644
--- a/doc/reference_sfcgal.xml
+++ b/doc/reference_sfcgal.xml
@@ -483,7 +483,7 @@ FROM ( SELECT ST_Extrude(ST_Buffer(ST_GeomFromText('POINT(100 90)'),
<refnamediv>
<refname>ST_AlphaShape</refname>
- <refpurpose>Computes a possible concave geometry using the CGAL Alpha Shapes algorithm.</refpurpose>
+ <refpurpose>Computes an Alpha-shape enclosing a geometry</refpurpose>
</refnamediv>
<refsynopsisdiv>
@@ -500,13 +500,29 @@ FROM ( SELECT ST_Extrude(ST_Buffer(ST_GeomFromText('POINT(100 90)'),
<refsection>
<title>Description</title>
- <para>Assume we are given a set S of points in 2D [...] and we would like to have something like "the shape formed by these points". This is quite a vague notion and there are probably many possible interpretations, the α-shape being one of them. Alpha shapes can be used for shape reconstruction from a dense unorganized set of data points. Indeed, an α-shape is demarcated by a frontier, which is a linear approximation of the original shape [1].
- [1] F. Bernardini and C. Bajaj. Sampling and reconstructing manifolds using alpha-shapes. Technical Report CSD-TR-97-013, Dept. Comput. Sci., Purdue Univ., West Lafayette, IN, 1997.
-
- Source: <ulink url="https://doc.cgal.org/latest/Alpha_shapes_2/index.html#Chapter_2D_Alpha_Shapes">CGAL ALpha Shapes</ulink>
-
- This function compute the concave hull of a set of geometry, but using CGAL and a different algorithm than ST_ConcaveHull performed by the GEOS module.
- See : <ulink url="http://lin-ear-th-inking.blogspot.com/2022/01/concave-hulls-in-jts.html">Concave Hulls in JTS</ulink></para>
+ <para>Computes the
+ <ulink url="https://en.wikipedia.org/wiki/Alpha_shape">Alpha-Shape</ulink>
+ of the points in a geometry,
+ which is a polygonal geometry enclosing all the points in the input.
+ The "closeness of fit" of the result is controlled by the <parameter>alpha</parameter> parameter,
+ which can have values from 0 to infinity.
+ Smaller alpha value produce more concave results.
+ Alpha values greater than some (usually large) value produce the convex hull of the input.
+ </para>
+ <note><para>
+ Following the CGAL implementation, the alpha value is the <emphasis>square</emphasis> of the radius of the disc used
+ in the Alpha-Shape algorithm to "erode" the Delaunay Triangulation of the input points.
+ See <ulink url="https://doc.cgal.org/latest/Alpha_shapes_2/index.html#Chapter_2D_Alpha_Shapes">CGAL Alpha-Shapes</ulink>
+ for more information.
+ This is different to the orignal definition of alpha-shapes,
+ which defines alpha as the radius of the eroding disc.
+ </para></note>
+
+ <para>The computed alpha-shape will not contain holes unless the optional <varname>allow_holes</varname> argument is specified as true.
+ </para>
+ <para>
+ This function effectively computes a concave hull of a geometry, but using CGAL and a different algorithm than <xref linkend="ST_ConcaveHull" />.
+ </para>
<para>Availability: 3.3.0 - requires SFCGAL >= 1.4.1.</para>
<para>&sfcgal_required;</para>
@@ -520,7 +536,7 @@ FROM ( SELECT ST_Extrude(ST_Buffer(ST_GeomFromText('POINT(100 90)'),
<imageobject>
<imagedata fileref="images/st_alphashape01.png" />
</imageobject>
- <caption><para>Concave Hull of a MultiPoint (same example As ST_OptimalAlphaShape)</para></caption>
+ <caption><para>Alpha-shape of a MultiPoint (same example As <xref linkend="ST_OptimalAlphaShape" />)</para></caption>
</mediaobject>
</informalfigure>
<programlisting>SELECT ST_AsText(ST_AlphaShape('MULTIPOINT((63 84),(76 88),(68 73),(53 18),(91 50),(81 70),
@@ -539,7 +555,7 @@ FROM ( SELECT ST_Extrude(ST_Buffer(ST_GeomFromText('POINT(100 90)'),
<imageobject>
<imagedata fileref="images/st_alphashape02.png" />
</imageobject>
- <caption><para>Concave Hull of a MultiPoint, allowing holes (same example as ST_OptimalAlphaShape)</para></caption>
+ <caption><para>Alpha-shape of a MultiPoint, allowing holes (same example as <xref linkend="ST_OptimalAlphaShape" />)</para></caption>
</mediaobject>
</informalfigure>
<programlisting>SELECT ST_AsText(ST_AlphaShape('MULTIPOINT((63 84),(76 88),(68 73),(53 18),(91 50),(81 70),(88 29),(24 82),(32 51),(37 23),(27 54),(84 19),(75 87),(44 42),(77 67),(90 30),(36 61),(32 65),(81 47),(88 58),(68 73),(49 95),(81 60),(87 50),
@@ -557,7 +573,7 @@ FROM ( SELECT ST_Extrude(ST_Buffer(ST_GeomFromText('POINT(100 90)'),
<imageobject>
<imagedata fileref="images/st_alphashape03.png" />
</imageobject>
- <caption><para>Concave Hull of a MultiPoint, allowing holes (same example as ST_ConcaveHull)</para></caption>
+ <caption><para>Alpha-shape of a MultiPoint, allowing holes (same example as <xref linkend="ST_ConcaveHull" />)</para></caption>
</mediaobject>
</informalfigure>
<programlisting>SELECT ST_AlphaShape(
@@ -1060,16 +1076,16 @@ MULTIPOLYGON(
<refnamediv>
<refname>ST_OptimalAlphaShape</refname>
- <refpurpose>Computes a possible concave geometry using the CGAL Alpha Shapes algorithm after have computed the "optimal" alpha value.</refpurpose>
+ <refpurpose>Computes an Alpha-shape enclosing a geometry using an "optimal" alpha value.</refpurpose>
</refnamediv>
<refsynopsisdiv>
<funcsynopsis>
<funcprototype>
- <funcdef>geometry<function>ST_OptimalAlphaShape</function></funcdef>
- <paramdef><type>geometry</type> <parameter>param_geom</parameter></paramdef>
+ <funcdef>geometry <function>ST_OptimalAlphaShape</function></funcdef>
+ <paramdef><type>geometry</type> <parameter>geom</parameter></paramdef>
<paramdef choice="opt"><type>boolean </type> <parameter>allow_holes = false</parameter></paramdef>
- <paramdef choice="opt"><type>integer </type> <parameter>nb_components</parameter></paramdef>
+ <paramdef choice="opt"><type>integer </type> <parameter>nb_components = 1</parameter></paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
@@ -1077,12 +1093,21 @@ MULTIPOLYGON(
<refsection>
<title>Description</title>
- <para>Computes the "optimal" alpha-shapes of the set of geometry.
-
- CGAL can automatically find the optimal value of alpha. This version uses it to find an "optimal" alpha-shape.
- The result is a single polygon. It will not contain holes unless the optional <varname>param_allow_holes</varname> argument is specified as true.
-
- The result will be generated such that the number of solid component of the alpha shape is equal to or smaller than <varname>param_nb_components</varname>.</para>
+ <para>Computes the "optimal" alpha-shape of the points in a geometry.
+ The alpha-shape is computed using a value of α chosen so that:
+ </para>
+ <orderedlist>
+ <listitem>
+ <para>the number of polygon elements is equal to or smaller than <varname>nb_components</varname>
+ (which defaults to 1)</para>
+ </listitem>
+ <listitem>
+ <para>all input points are contained in the shape</para>
+ </listitem>
+ </orderedlist>
+ <para>
+ The result will not contain holes unless the optional <varname>allow_holes</varname> argument is specified as true.
+ </para>
<para>Availability: 3.3.0 - requires SFCGAL >= 1.4.1.</para>
<para>&sfcgal_required;</para>
@@ -1096,7 +1121,7 @@ MULTIPOLYGON(
<imageobject>
<imagedata fileref="images/st_optimalalphashape01.png" />
</imageobject>
- <caption><para>Concave Hull of a MultiPoint (same example as ST_AlphaShape)</para></caption>
+ <caption><para>Optimal alpha-shape of a MultiPoint (same example as <xref linkend="ST_AlphaShape" />)</para></caption>
</mediaobject>
</informalfigure>
<programlisting>SELECT ST_AsText(ST_OptimalAlphaShape('MULTIPOINT((63 84),(76 88),(68 73),(53 18),(91 50),(81 70),
@@ -1116,7 +1141,7 @@ MULTIPOLYGON(
<imageobject>
<imagedata fileref="images/st_optimalalphashape02.png" />
</imageobject>
- <caption><para>Concave Hull of a MultiPoint, allowing holes (same example as ST_AlphaShape)</para></caption>
+ <caption><para>Optimal alpha-shape of a MultiPoint, allowing holes (same example as <xref linkend="ST_AlphaShape" />)</para></caption>
</mediaobject>
</informalfigure>
<programlisting>SELECT ST_AsText(ST_OptimalAlphaShape('MULTIPOINT((63 84),(76 88),(68 73),(53 18),(91 50),(81 70),(88 29),(24 82),(32 51),(37 23),(27 54),(84 19),(75 87),(44 42),(77 67),(90 30),(36 61),(32 65),(81 47),(88 58),(68 73),(49 95),(81 60),(87 50),
-----------------------------------------------------------------------
Summary of changes:
doc/html/image_src/st_alphashape01.wkt | 4 +-
doc/reference_sfcgal.xml | 71 +++++++++++++++++++++++-----------
2 files changed, 50 insertions(+), 25 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list