[postgis-tickets] [SCM] PostGIS branch master updated. 3.3.0rc2-584-g6c3242de1
git at osgeo.org
git at osgeo.org
Thu Feb 2 15:02:33 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 6c3242de1f80cfcc196d6268c67b9ae8caf3a919 (commit)
from 398bee7211f8441720094ebbe9541d9fd256b590 (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 6c3242de1f80cfcc196d6268c67b9ae8caf3a919
Author: Martin Davis <mtnclimb at gmail.com>
Date: Thu Feb 2 15:07:02 2023 -0800
Improve doc for ST_ChaikinSmoothing some more
diff --git a/doc/html/image_src/Makefile.in b/doc/html/image_src/Makefile.in
index 4ab488ce6..aa0e7c6ed 100644
--- a/doc/html/image_src/Makefile.in
+++ b/doc/html/image_src/Makefile.in
@@ -58,6 +58,9 @@ IMAGES= \
../images/st_chaikinsmoothing01.png \
../images/st_chaikinsmoothing02.png \
../images/st_chaikinsmoothing03.png \
+ ../images/st_chaikinsmoothing04.png \
+ ../images/st_chaikinsmoothing05.png \
+ ../images/st_chaikinsmoothing06.png \
../images/st_contains01.png \
../images/st_contains02.png \
../images/st_contains03.png \
diff --git a/doc/html/image_src/st_chaikinsmoothing04.wkt b/doc/html/image_src/st_chaikinsmoothing04.wkt
new file mode 100644
index 000000000..fdb07cad6
--- /dev/null
+++ b/doc/html/image_src/st_chaikinsmoothing04.wkt
@@ -0,0 +1,2 @@
+ArgA-thin;LINESTRING (10 140, 80 130, 100 190, 190 150, 140 20, 120 120, 50 30, 30 100)
+Result;LINESTRING(10 140,62.5 132.5,85 145,95 175,122.5 180,167.5 160,177.5 117.5,152.5 52.5,135 45,125 95,102.5 97.5,67.5 52.5,45 47.5,30 100)
diff --git a/doc/html/image_src/st_chaikinsmoothing05.wkt b/doc/html/image_src/st_chaikinsmoothing05.wkt
new file mode 100644
index 000000000..4b1acf252
--- /dev/null
+++ b/doc/html/image_src/st_chaikinsmoothing05.wkt
@@ -0,0 +1,2 @@
+ArgA-thin;LINESTRING (10 140, 80 130, 100 190, 190 150, 140 20, 120 120, 50 30, 30 100)
+Result;LINESTRING(10 140,49.375 134.375,68.125 135.625,79.375 141.875,87.5 152.5,92.5 167.5,101.875 176.25,115.625 178.75,133.75 175,156.25 165,170 149.375,175 128.125,171.25 101.25,158.75 68.75,148.125 50.625,139.375 46.875,132.5 57.5,127.5 82.5,119.375 95.625,108.125 96.875,93.75 86.25,76.25 63.75,61.875 51.25,50.625 48.75,41.25 60.625,30 100)
diff --git a/doc/html/image_src/st_chaikinsmoothing06.wkt b/doc/html/image_src/st_chaikinsmoothing06.wkt
new file mode 100644
index 000000000..1385fa027
--- /dev/null
+++ b/doc/html/image_src/st_chaikinsmoothing06.wkt
@@ -0,0 +1,2 @@
+ArgA-thin;LINESTRING (10 140, 80 130, 100 190, 190 150, 140 20, 120 120, 50 30, 30 100)
+Result;LINESTRING(10 140,39.53125 135.78125,54.0625 134.6875,63.4375 135.3125,70.9375 137.1875,76.5625 140.3125,81.40625 144.53125,85.46875 149.84375,88.75 156.25,91.25 163.75,94.84375 169.6875,99.53125 174.0625,105.3125 176.875,112.1875 178.125,120.15625 177.8125,129.21875 175.9375,139.375 172.5,150.625 167.5,159.6875 161.09375,166.5625 153.28125,171.25 144.0625,173.75 133.4375,174.0625 121.40625,172.1875 107.96875,168.125 93.125,161.875 76.875,156.09375 64.21875,150.78125 55.15625,145.9375 49.6875,141.5625 47.8125,137.65625 49.53125,134.21875 54.84375,131.25 63.75,128.75 76.25,125.46875 85.78125,121.40625 92.34375,116.5625 95.9375,110.9375 96.5625,104.53125 94.21875,97.34375 88.90625,89.375 80.625,80.625 69.375,72.65625 60.625,65.46875 54.375,59.0625 50.625,53.4375 49.375,48.28125 51.71875,43.59375 57.65625,38.4375 70.46875,30 100)
diff --git a/doc/reference_processing.xml b/doc/reference_processing.xml
index 9cb1427e4..4ec658043 100644
--- a/doc/reference_processing.xml
+++ b/doc/reference_processing.xml
@@ -627,19 +627,25 @@ POINT(0.5 1)
<refsection>
<title>Description</title>
- <para>Smoothes a geometry using
+ <para>Smoothes a linear or polygonal geometry using
<ulink url="http://www.idav.ucdavis.edu/education/CAGDNotes/Chaikins-Algorithm/Chaikins-Algorithm.html">Chaikin's algorithm</ulink>.
- The degree of smoothing is controlled by the <varname>nIterations</varname> parameter
- (which is limited to a maximum of 5 iterations).
- On each iteration, each vertex is replaced by two vertices placed at 1/4 of the length of the line segments before and after the vertex.
+ The degree of smoothing is controlled by the <varname>nIterations</varname> parameter.
+ On each iteration, each interior vertex is replaced
+ by two vertices located at 1/4 of the length of the line segments before and after the vertex.
+ A reasonable degree of smoothing is provided by 3 iterations; the maximum is limited to 5.
+ </para>
+
+ <para>If <varname>preserveEndPoints</varname> is true, the endpoints of Polygon rings are not smoothed.
+ The endpoints of LineStrings are always preserved.
</para>
<note><para>The number of vertices doubles with each iteration,
- so the result geometry may have many more points than the input.
- To reduce the number of points use a simplification function on the result
- (see <xref linkend="ST_Simplify" /> and <xref linkend="ST_SimplifyVW" />).</para></note>
+ so the result geometry may have many more points than the input.
+ To reduce the number of points use a simplification function on the result
+ (see <xref linkend="ST_Simplify" />, <xref linkend="ST_SimplifyPreserveTopology" />
+ and <xref linkend="ST_SimplifyVW" />).
+ </para></note>
- <para>The <varname>preserveEndPoints</varname> parameter is valid only for polygons; it is ignored for linestrings.</para>
<para>The result has interpolated values for the Z and M dimenions when present.</para>
@@ -659,6 +665,7 @@ FROM (SELECT 'POLYGON((0 0, 8 8, 0 16, 0 0))'::geometry geom) AS foo;
POLYGON((2 2,6 6,6 10,2 14,0 12,0 4,2 2))
</programlisting>
+ <para>Smoothing a Polygon using 1, 2 and 3 iterations:</para>
<informaltable>
<tgroup cols="3">
<tbody>
@@ -693,16 +700,57 @@ FROM (SELECT 'POLYGON((0 0, 8 8, 0 16, 0 0))'::geometry geom) AS foo;
</tbody>
</tgroup>
</informaltable>
- <para>Smoothing a polygon using 1, 2 and 3 iterations:</para>
<programlisting>
SELECT ST_ChaikinSmoothing(
'POLYGON ((20 20, 60 90, 10 150, 100 190, 190 160, 130 120, 190 50, 140 70, 120 10, 90 60, 20 20))',
generate_series(1, 3) );
</programlisting>
+
+ <para>Smoothing a LineString using 1, 2 and 3 iterations:</para>
+ <informaltable>
+ <tgroup cols="3">
+ <tbody>
+ <row>
+ <entry><para><informalfigure>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/st_chaikinsmoothing04.png" />
+ </imageobject>
+ <caption><para>nIterations = 1</para></caption>
+ </mediaobject>
+ </informalfigure></para></entry>
+
+ <entry><para><informalfigure>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/st_chaikinsmoothing05.png" />
+ </imageobject>
+ <caption><para>nIterations = 2</para></caption>
+ </mediaobject>
+ </informalfigure></para></entry>
+
+ <entry><para><informalfigure>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/st_chaikinsmoothing06.png" />
+ </imageobject>
+ <caption><para>nIterations = 3</para></caption>
+ </mediaobject>
+ </informalfigure></para></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <programlisting>
+SELECT ST_ChaikinSmoothing(
+ 'LINESTRING (10 140, 80 130, 100 190, 190 150, 140 20, 120 120, 50 30, 30 100)',
+ generate_series(1, 3) );
+</programlisting>
+
</refsection>
<refsection>
<title>See Also</title>
- <para><xref linkend="ST_Simplify" />, <xref linkend="ST_SimplifyVW" /></para>
+ <para><xref linkend="ST_Simplify" />, <xref linkend="ST_SimplifyPreserveTopology" />, <xref linkend="ST_SimplifyVW" /></para>
</refsection>
</refentry>
-----------------------------------------------------------------------
Summary of changes:
doc/html/image_src/Makefile.in | 3 ++
doc/html/image_src/st_chaikinsmoothing04.wkt | 2 +
doc/html/image_src/st_chaikinsmoothing05.wkt | 2 +
doc/html/image_src/st_chaikinsmoothing06.wkt | 2 +
doc/reference_processing.xml | 68 ++++++++++++++++++++++++----
5 files changed, 67 insertions(+), 10 deletions(-)
create mode 100644 doc/html/image_src/st_chaikinsmoothing04.wkt
create mode 100644 doc/html/image_src/st_chaikinsmoothing05.wkt
create mode 100644 doc/html/image_src/st_chaikinsmoothing06.wkt
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list