[postgis-tickets] r14677 - Move all ST_Cluster* docs to measurement section

Daniel Baston dbaston at gmail.com
Wed Feb 24 05:00:16 PST 2016


Author: dbaston
Date: 2016-02-24 05:00:16 -0800 (Wed, 24 Feb 2016)
New Revision: 14677

Modified:
   trunk/doc/reference_measure.xml
   trunk/doc/reference_processing.xml
Log:
Move all ST_Cluster* docs to measurement section

Modified: trunk/doc/reference_measure.xml
===================================================================
--- trunk/doc/reference_measure.xml	2016-02-24 12:48:55 UTC (rev 14676)
+++ trunk/doc/reference_measure.xml	2016-02-24 13:00:16 UTC (rev 14677)
@@ -1032,6 +1032,236 @@
 	  </refsection>
 </refentry>
 
+    <refentry id="ST_ClusterDBSCAN">
+	  <refnamediv>
+		<refname>ST_ClusterDBSCAN</refname>
+
+        <refpurpose>Windowing function that returns integer id for the cluster each input geometry is in.</refpurpose>
+    </refnamediv>
+
+	  <refsynopsisdiv>
+		<funcsynopsis>
+		  <funcprototype>
+			<funcdef>integer <function>ST_ClusterDBSCAN</function></funcdef>
+
+			<paramdef><type>geometry </type>
+			<parameter>geom</parameter></paramdef>
+
+			<paramdef><type>float8 </type>
+			<parameter>eps</parameter></paramdef>
+
+			<paramdef><type>int </type>
+			<parameter>minpoints</parameter></paramdef>
+		  </funcprototype>
+		</funcsynopsis>
+	  </refsynopsisdiv>
+
+	  <refsection>
+      <title>Description</title>
+
+      <para>Returns cluster number for each input geometry, based on a 2D 
+          implementation of the 
+          <ulink url="https://en.wikipedia.org/wiki/DBSCAN">DBSCAN</ulink> 
+          algorithm.  An input geometry will be added to a cluster if it is 
+          within <varname>eps</varname> distance of at least
+          <varname>minpoints</varname> other input geometries.
+      </para>
+    </refsection>
+
+    <refsection>
+      <title>Examples</title>
+      <para>
+          Assigning a cluster number to each parcel point:
+      </para>
+		    <programlisting>
+SELECT parcel_id, ST_ClusterDBSCAN(geom, eps := 0.5, minpoints := 5) over () AS cid
+FROM parcels;
+</programlisting>
+
+
+        <para>
+            Combining parcels with the same cluster number into a single geometry:
+        </para>
+		    <programlisting>
+SELECT cid, ST_Collect(geom) AS cluster_geom, array_agg(parcel_id) AS ids_in_cluster FROM (
+    SELECT parcel_id, ST_ClusterDBSCAN(geom, eps := 0.5, minpoints := 5) over () AS cid, geom
+    FROM parcels) sq
+GROUP BY cid;
+    </programlisting>
+    </refsection>
+
+    <refsection>
+		  <title>See Also</title>
+          <para>
+              <xref linkend="ST_ClusterKMeans"/>,
+              <xref linkend="ST_ClusterIntersecting"/>,
+              <xref linkend="ST_ClusterWithin"/> 
+          </para>
+	  </refsection>
+
+    </refentry>
+
+    <refentry id="ST_ClusterIntersecting">
+      <refnamediv>
+        <refname>ST_ClusterIntersecting</refname>
+
+        <refpurpose>Aggregate.  Returns an array with the connected components of a set of geometries</refpurpose>
+      </refnamediv>
+
+      <refsynopsisdiv>
+        <funcsynopsis>
+          <funcprototype>
+            <funcdef>geometry[] <function>ST_ClusterIntersecting</function></funcdef>
+            <paramdef><type>geometry </type> <parameter>g</parameter></paramdef>
+          </funcprototype>
+        </funcsynopsis>
+      </refsynopsisdiv>
+
+      <refsection>
+        <title>Description</title>
+
+        <para>ST_ClusterIntersecting is an aggregate function that returns an array of GeometryCollections, where each GeometryCollection represents an interconnected set of geometries.</para>
+
+        <para>Availability: 2.2.0 - requires GEOS </para>
+      </refsection>
+
+      <refsection>
+        <title>Examples</title>
+        <programlisting>
+WITH testdata AS
+  (SELECT unnest(ARRAY['LINESTRING (0 0, 1 1)'::geometry,
+		       'LINESTRING (5 5, 4 4)'::geometry,
+		       'LINESTRING (6 6, 7 7)'::geometry,
+		       'LINESTRING (0 0, -1 -1)'::geometry,
+		       'POLYGON ((0 0, 4 0, 4 4, 0 4, 0 0))'::geometry]) AS geom)
+
+SELECT ST_AsText(unnest(ST_ClusterIntersecting(geom))) FROM testdata;
+
+--result
+
+st_astext
+---------
+GEOMETRYCOLLECTION(LINESTRING(0 0,1 1),LINESTRING(5 5,4 4),LINESTRING(0 0,-1 -1),POLYGON((0 0,4 0,4 4,0 4,0 0)))
+GEOMETRYCOLLECTION(LINESTRING(6 6,7 7))
+        </programlisting>
+      </refsection>
+      <refsection>
+        <title>See Also</title>
+        <para>
+            <xref linkend="ST_ClusterDBSCAN" />,
+            <xref linkend="ST_ClusterKMeans" />,
+            <xref linkend="ST_ClusterWithin" />
+        </para>
+      </refsection>
+
+    </refentry>
+
+
+	<refentry id="ST_ClusterKMeans">
+	  <refnamediv>
+		<refname>ST_ClusterKMeans</refname>
+
+		<refpurpose>Windowing function that returns integer id for the cluster each input geometry is in.</refpurpose>
+	  </refnamediv>
+
+	  <refsynopsisdiv>
+		<funcsynopsis>
+		  <funcprototype>
+			<funcdef>integer <function>ST_ClusterKMeans</function></funcdef>
+
+			<paramdef><type>geometry </type>
+			<parameter>geom</parameter></paramdef>
+
+			<paramdef><type>integer </type>
+			<parameter>number_of_clusters</parameter></paramdef>
+		  </funcprototype>
+		</funcsynopsis>
+	  </refsynopsisdiv>
+
+	  <refsection>
+      <title>Description</title>
+
+      <para>Returns 2D distance based 
+        <ulink url="https://en.wikipedia.org/wiki/K-means_clustering">k-means</ulink> 
+        cluster number for each input geometry. The distance used for clustering is the 
+        distance between the centroids of the geometries.
+      </para>
+    </refsection>
+
+    <refsection>
+      <title>Examples</title>
+		    <programlisting>
+SELECT ST_ClusterKMeans(geom, 5) over (), geom, parcel_id 
+FROM parcels;
+</programlisting>
+    </refsection>
+
+    <refsection>
+		  <title>See Also</title>
+          <para>
+              <xref linkend="ST_ClusterDBSCAN"/>,
+              <xref linkend="ST_ClusterIntersecting" />,
+              <xref linkend="ST_ClusterWithin" /> 
+          </para>
+	  </refsection>
+	</refentry>  
+
+	<refentry id="ST_ClusterWithin">
+      <refnamediv>
+        <refname>ST_ClusterWithin</refname>
+
+        <refpurpose>Aggregate.  Returns an array of GeometryCollections, where each GeometryCollection represents a set of geometries separated by no more than the specified distance.</refpurpose>
+      </refnamediv>
+
+      <refsynopsisdiv>
+        <funcsynopsis>
+          <funcprototype>
+            <funcdef>geometry[] <function>ST_ClusterWithin</function></funcdef>
+            <paramdef><type>geometry </type> <parameter>g</parameter></paramdef>
+            <paramdef><type>float8 </type> <parameter>distance</parameter></paramdef>
+          </funcprototype>
+        </funcsynopsis>
+      </refsynopsisdiv>
+
+      <refsection>
+        <title>Description</title>
+
+        <para>ST_ClusterWithin is an aggregate function that returns an array of GeometryCollections, where each GeometryCollection represents a set of geometries separated by no more than the specified distance.</para>
+
+        <para>Availability: 2.2.0 - requires GEOS</para>
+      </refsection>
+
+      <refsection>
+        <title>Examples</title>
+        <programlisting>
+WITH testdata AS
+  (SELECT unnest(ARRAY['LINESTRING (0 0, 1 1)'::geometry,
+		       'LINESTRING (5 5, 4 4)'::geometry,
+		       'LINESTRING (6 6, 7 7)'::geometry,
+		       'LINESTRING (0 0, -1 -1)'::geometry,
+		       'POLYGON ((0 0, 4 0, 4 4, 0 4, 0 0))'::geometry]) AS geom)
+
+SELECT ST_AsText(unnest(ST_ClusterWithin(geom, 1.4))) FROM testdata;
+
+--result
+
+st_astext
+---------
+GEOMETRYCOLLECTION(LINESTRING(0 0,1 1),LINESTRING(5 5,4 4),LINESTRING(0 0,-1 -1),POLYGON((0 0,4 0,4 4,0 4,0 0)))
+GEOMETRYCOLLECTION(LINESTRING(6 6,7 7))
+        </programlisting>
+      </refsection>
+      <refsection>
+        <title>See Also</title>
+        <para>
+          <xref linkend="ST_ClusterDBSCAN" />,
+          <xref linkend="ST_ClusterKMeans" />,
+          <xref linkend="ST_ClusterIntersecting" />
+        </para>
+      </refsection>
+
+    </refentry>
+
   <refentry id="ST_Contains">
 	  <refnamediv>
 		<refname>ST_Contains</refname>
@@ -4160,117 +4390,6 @@
 		<para><xref linkend="ST_Contains"/>, <xref linkend="ST_Equals"/>, <xref linkend="ST_IsValid"/></para>
 	  </refsection>
 	</refentry>
-
-    <refentry id="ST_ClusterDBSCAN">
-	  <refnamediv>
-		<refname>ST_ClusterDBSCAN</refname>
-
-        <refpurpose>Windowing function that returns integer id for the cluster each input geometry is in.</refpurpose>
-    </refnamediv>
-
-	  <refsynopsisdiv>
-		<funcsynopsis>
-		  <funcprototype>
-			<funcdef>integer <function>ST_ClusterDBSCAN</function></funcdef>
-
-			<paramdef><type>geometry </type>
-			<parameter>geom</parameter></paramdef>
-
-			<paramdef><type>float8 </type>
-			<parameter>eps</parameter></paramdef>
-
-			<paramdef><type>int </type>
-			<parameter>minpoints</parameter></paramdef>
-		  </funcprototype>
-		</funcsynopsis>
-	  </refsynopsisdiv>
-
-	  <refsection>
-      <title>Description</title>
-
-      <para>Returns cluster number for each input geometry, based on a 2D 
-          implementation of the 
-          <ulink url="https://en.wikipedia.org/wiki/DBSCAN">DBSCAN</ulink> 
-          algorithm.  An input geometry will be added to a cluster if it is 
-          within <varname>eps</varname> distance of at least
-          <varname>minpoints</varname> other input geometries.
-      </para>
-    </refsection>
-
-    <refsection>
-      <title>Examples</title>
-      <para>
-          Assigning a cluster number to each parcel point:
-      </para>
-		    <programlisting>
-SELECT parcel_id, ST_ClusterDBSCAN(geom, eps := 0.5, minpoints := 5) over () AS cid
-FROM parcels;
-</programlisting>
-
-
-        <para>
-            Combining parcels with the same cluster number into a single geometry:
-        </para>
-		    <programlisting>
-SELECT cid, ST_Collect(geom) AS cluster_geom, array_agg(parcel_id) AS ids_in_cluster FROM (
-    SELECT parcel_id, ST_ClusterDBSCAN(geom, eps := 0.5, minpoints := 5) over () AS cid, geom
-    FROM parcels) sq
-GROUP BY cid;
-</programlisting>
-    </refsection>
-
-    <refsection>
-		  <title>See Also</title>
-      <para><xref linkend="ST_ClusterKMeans"/></para>
-	  </refsection>
-
-    </refentry>
-
   
-	<refentry id="ST_ClusterKMeans">
-	  <refnamediv>
-		<refname>ST_ClusterKMeans</refname>
-
-		<refpurpose>Windowing function that returns integer id for the cluster each input geometry is in.</refpurpose>
-	  </refnamediv>
-
-	  <refsynopsisdiv>
-		<funcsynopsis>
-		  <funcprototype>
-			<funcdef>integer <function>ST_ClusterKMeans</function></funcdef>
-
-			<paramdef><type>geometry </type>
-			<parameter>geom</parameter></paramdef>
-
-			<paramdef><type>integer </type>
-			<parameter>number_of_clusters</parameter></paramdef>
-		  </funcprototype>
-		</funcsynopsis>
-	  </refsynopsisdiv>
-
-	  <refsection>
-      <title>Description</title>
-
-      <para>Returns 2D distance based 
-        <ulink url="https://en.wikipedia.org/wiki/K-means_clustering">k-means</ulink> 
-        cluster number for each input geometry. The distance used for clustering is the 
-        distance between the centroids of the geometries.
-      </para>
-    </refsection>
-
-    <refsection>
-      <title>Examples</title>
-		    <programlisting>
-SELECT ST_ClusterKMeans(geom, 5) over (), geom, parcel_id 
-FROM parcels;
-</programlisting>
-    </refsection>
-
-    <refsection>
-		  <title>See Also</title>
-      <para><xref linkend="ST_ClusterDBSCAN"/></para>
-	  </refsection>
-	</refentry>  
   
-  
 </sect1>

Modified: trunk/doc/reference_processing.xml
===================================================================
--- trunk/doc/reference_processing.xml	2016-02-24 12:48:55 UTC (rev 14676)
+++ trunk/doc/reference_processing.xml	2016-02-24 13:00:16 UTC (rev 14677)
@@ -416,113 +416,6 @@
 	  </refsection>
 	</refentry>
 	
-	    <refentry id="ST_ClusterIntersecting">
-      <refnamediv>
-        <refname>ST_ClusterIntersecting</refname>
-
-        <refpurpose>Aggregate.  Returns an array with the connected components of a set of geometries</refpurpose>
-      </refnamediv>
-
-      <refsynopsisdiv>
-        <funcsynopsis>
-          <funcprototype>
-            <funcdef>geometry[] <function>ST_ClusterIntersecting</function></funcdef>
-            <paramdef><type>geometry </type> <parameter>g</parameter></paramdef>
-          </funcprototype>
-        </funcsynopsis>
-      </refsynopsisdiv>
-
-      <refsection>
-        <title>Description</title>
-
-        <para>ST_ClusterIntersecting is an aggregate function that returns an array of GeometryCollections, where each GeometryCollection represents an interconnected set of geometries.</para>
-
-        <para>Availability: 2.2.0 - requires GEOS </para>
-      </refsection>
-
-      <refsection>
-        <title>Examples</title>
-        <programlisting>
-WITH testdata AS
-  (SELECT unnest(ARRAY['LINESTRING (0 0, 1 1)'::geometry,
-		       'LINESTRING (5 5, 4 4)'::geometry,
-		       'LINESTRING (6 6, 7 7)'::geometry,
-		       'LINESTRING (0 0, -1 -1)'::geometry,
-		       'POLYGON ((0 0, 4 0, 4 4, 0 4, 0 0))'::geometry]) AS geom)
-
-SELECT ST_AsText(unnest(ST_ClusterIntersecting(geom))) FROM testdata;
-
---result
-
-st_astext
----------
-GEOMETRYCOLLECTION(LINESTRING(0 0,1 1),LINESTRING(5 5,4 4),LINESTRING(0 0,-1 -1),POLYGON((0 0,4 0,4 4,0 4,0 0)))
-GEOMETRYCOLLECTION(LINESTRING(6 6,7 7))
-        </programlisting>
-      </refsection>
-      <refsection>
-        <title>See Also</title>
-        <para>
-          <xref linkend="ST_ClusterWithin" />,
-        </para>
-      </refsection>
-
-    </refentry>
-
-	<refentry id="ST_ClusterWithin">
-      <refnamediv>
-        <refname>ST_ClusterWithin</refname>
-
-        <refpurpose>Aggregate.  Returns an array of GeometryCollections, where each GeometryCollection represents a set of geometries separated by no more than the specified distance.</refpurpose>
-      </refnamediv>
-
-      <refsynopsisdiv>
-        <funcsynopsis>
-          <funcprototype>
-            <funcdef>geometry[] <function>ST_ClusterWithin</function></funcdef>
-            <paramdef><type>geometry </type> <parameter>g</parameter></paramdef>
-            <paramdef><type>float8 </type> <parameter>distance</parameter></paramdef>
-          </funcprototype>
-        </funcsynopsis>
-      </refsynopsisdiv>
-
-      <refsection>
-        <title>Description</title>
-
-        <para>ST_ClusterWithin is an aggregate function that returns an array of GeometryCollections, where each GeometryCollection represents a set of geometries separated by no more than the specified distance.</para>
-
-        <para>Availability: 2.2.0 - requires GEOS</para>
-      </refsection>
-
-      <refsection>
-        <title>Examples</title>
-        <programlisting>
-WITH testdata AS
-  (SELECT unnest(ARRAY['LINESTRING (0 0, 1 1)'::geometry,
-		       'LINESTRING (5 5, 4 4)'::geometry,
-		       'LINESTRING (6 6, 7 7)'::geometry,
-		       'LINESTRING (0 0, -1 -1)'::geometry,
-		       'POLYGON ((0 0, 4 0, 4 4, 0 4, 0 0))'::geometry]) AS geom)
-
-SELECT ST_AsText(unnest(ST_ClusterWithin(geom, 1.4))) FROM testdata;
-
---result
-
-st_astext
----------
-GEOMETRYCOLLECTION(LINESTRING(0 0,1 1),LINESTRING(5 5,4 4),LINESTRING(0 0,-1 -1),POLYGON((0 0,4 0,4 4,0 4,0 0)))
-GEOMETRYCOLLECTION(LINESTRING(6 6,7 7))
-        </programlisting>
-      </refsection>
-      <refsection>
-        <title>See Also</title>
-        <para>
-          <xref linkend="ST_ClusterIntersecting" />,
-        </para>
-      </refsection>
-
-    </refentry>
-
 	<refentry id="ST_Collect">
 	  <refnamediv>
 		<refname>ST_Collect</refname>



More information about the postgis-tickets mailing list