[postgis-tickets] [SCM] PostGIS branch master updated. 3.2.0-778-gcf6aebcab

git at osgeo.org git at osgeo.org
Thu Apr 28 12:15:25 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  cf6aebcab8067ff2e4853f3d9730389f639c3b24 (commit)
      from  78926de5621eccdd9ddc80575d9791d5a27b3c67 (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 cf6aebcab8067ff2e4853f3d9730389f639c3b24
Author: Martin Davis <mtnclimb at gmail.com>
Date:   Thu Apr 28 12:15:21 2022 -0700

    Improve doc for ST_RemoveRepeatedPoints

diff --git a/doc/reference_editor.xml b/doc/reference_editor.xml
index 4bd632565..a9171aa40 100644
--- a/doc/reference_editor.xml
+++ b/doc/reference_editor.xml
@@ -1528,8 +1528,8 @@ UPDATE sometable
     <refentry id="ST_RemoveRepeatedPoints">
       <refnamediv>
         <refname>ST_RemoveRepeatedPoints</refname>
-        <refpurpose>Returns a version of the given geometry with
-                duplicated points removed.</refpurpose>
+        <refpurpose>Returns a version of a geometry with
+                duplicate points removed.</refpurpose>
       </refnamediv>
 
       <refsynopsisdiv>
@@ -1544,14 +1544,15 @@ UPDATE sometable
 
       <refsection>
         <title>Description</title>
-        <para>Returns a version of the given geometry with
-                duplicated points removed. Will actually do something only with
-                (multi)lines, (multi)polygons and multipoints but you can safely call it with
-                any kind of geometry. Since simplification occurs on a
-                object-by-object basis you can also feed a GeometryCollection to
-                this function.</para>
-        <para>If the tolerance parameter is provided, vertices within the tolerance
-        of one another will be considered the "same" for the purposes of removal.</para>
+        <para>Returns a version of the given geometry with duplicate consecutive points removed.
+                The function processes only (Multi)LineStrings, (Multi)Polygons and MultiPoints
+                but it can be called with any kind of geometry.
+                Elements of GeometryCollections are processed individually.
+                The endpoints of LineStrings are preserved.
+        </para>
+
+        <para>If the <parameter>tolerance</parameter> parameter is provided, vertices within the tolerance distance
+        of one another are considered to be duplicates.</para>
 
         <para>Enhanced: 3.2.0</para>
         <para>Availability: 2.2.0</para>
@@ -1559,6 +1560,41 @@ UPDATE sometable
         <para>&Z_support;</para>
       </refsection>
 
+	  <refsection>
+		<title>Examples</title>
+
+		<programlisting>
+SELECT ST_AsText( ST_RemoveRepeatedPoints( 'MULTIPOINT ((1 1), (2 2), (3 3), (2 2))'));
+-------------------------
+ MULTIPOINT(1 1,2 2,3 3)
+</programlisting>
+
+		<programlisting>
+SELECT ST_AsText( ST_RemoveRepeatedPoints( 'LINESTRING (0 0, 0 0, 1 1, 0 0, 1 1, 2 2)'));
+---------------------------------
+ LINESTRING(0 0,1 1,0 0,1 1,2 2)
+</programlisting>
+
+      <para><emphasis role="bold">Example:</emphasis>
+      Collection elements are processed individually.
+      </para>
+		<programlisting>
+SELECT ST_AsText( ST_RemoveRepeatedPoints( 'GEOMETRYCOLLECTION (LINESTRING (1 1, 2 2, 2 2, 3 3), POINT (4 4), POINT (4 4), POINT (5 5))'));
+------------------------------------------------------------------------------
+ GEOMETRYCOLLECTION(LINESTRING(1 1,2 2,3 3),POINT(4 4),POINT(4 4),POINT(5 5))
+</programlisting>
+
+      <para><emphasis role="bold">Example:</emphasis>
+      Repeated point removal with a distance tolerance.
+      </para>
+		<programlisting>
+SELECT ST_AsText( ST_RemoveRepeatedPoints( 'LINESTRING (0 0, 0 0, 1 1, 5 5, 1 1, 2 2)', 2));
+-------------------------
+ LINESTRING(0 0,5 5,2 2)
+</programlisting>
+
+	  </refsection>
+
           <refsection>
             <title>See Also</title>
             <para><xref linkend="ST_Simplify" /></para>

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

Summary of changes:
 doc/reference_editor.xml | 56 +++++++++++++++++++++++++++++++++++++++---------
 1 file changed, 46 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list