]> granicus.if.org Git - postgis/commitdiff
Move over ST_Segmentize and ST_LineMerge
authorRegina Obe <lr@pcorp.us>
Wed, 15 Oct 2008 13:39:03 +0000 (13:39 +0000)
committerRegina Obe <lr@pcorp.us>
Wed, 15 Oct 2008 13:39:03 +0000 (13:39 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@3110 b70326c6-7e19-0410-871a-916f4a2858ee

doc/reference.xml
doc/reference_new.xml

index 79a1e7d99ac143fa8d91d3661dee5d9215ffc855..5675dc90d5459f687c0286185cf566d6c7e010a5 100644 (file)
@@ -1140,27 +1140,6 @@ z' = z </programlisting> This method is a subcase of the 3D method
           </listitem>
         </varlistentry>
 
-        <varlistentry>
-          <term>ST_Segmentize(geometry, maxlength)</term>
-
-          <listitem>
-            <para>Return a modified geometry having no segment longer then the
-            given distance. Interpolated points will have Z and M values (if
-            needed) set to 0. Distance computation is performed in 2d
-            only.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry id="ST_LineMerge">
-          <term>ST_LineMerge(geometry)</term>
-
-          <listitem>
-            <para>Returns a (set of) LineString(s) formed by sewing together
-            constituent linework of input.</para>
-
-            <para>Availability: 1.1.0 - requires GEOS &gt;= 2.1.0</para>
-          </listitem>
-        </varlistentry>
       </variablelist>
     </sect2>
 
@@ -1191,7 +1170,7 @@ z' = z </programlisting> This method is a subcase of the 3D method
           </listitem>
         </varlistentry>
 
-        <varlistentry id="line_substring">
+        <varlistentry id="ST_Line_Substring">
           <term>ST_Line_Substring(linestring geometry, startfraction float8, endfraction float8)</term>
 
           <listitem>
index aaafc7da8df742932211a3d127695beb38824c9b..d8c40134f72e80cd823b9870cb1da6fd8bd6b75c 100644 (file)
@@ -2505,7 +2505,63 @@ Line[ZB] with 2 points : Polygon[ZB] with 1 rings
                        <title>See Also</title>
                        <para><xref linkend="ST_RemovePoint"/>, <xref linkend="ST_SetPoint" /></para>
                  </refsection>
-               </refentry> 
+       </refentry>
+
+       <refentry id="ST_LineMerge">
+               <refnamediv>
+                       <refname>ST_LineMerge</refname>
+                       
+                       <refpurpose>Returns a (set of) LineString(s) formed by sewing together
+            a MULTILINESTRING.</refpurpose>
+               </refnamediv>
+               
+               <refsynopsisdiv>
+                       <funcsynopsis>
+                         <funcprototype>
+                               <funcdef>geometry <function>ST_LineMerge</function></funcdef>
+                               <paramdef><type>geometry </type> <parameter>amultilinestring</parameter></paramdef>
+                         </funcprototype>
+                       </funcsynopsis>
+               </refsynopsisdiv>
+       
+               <refsection>
+                       <title>Description</title>
+                       
+                       <para>Returns a (set of) LineString(s) formed by sewing together
+            the constituent line work of a MULTILINESTRING. </para>
+                       <note><para>Only use with MULTILINESTRING/LINESTRINGs. If you feed a polygon or geometry collection into this function, it 
+                       will return an empty GEOMETRYCOLLECTION</para></note>
+                       
+                       <para>Availability: 1.1.0</para>
+                       <note><para>requires GEOS &gt;= 2.1.0</para></note>
+               </refsection>
+               
+               <refsection>
+                       <title>Examples</title>
+                       
+                       <programlisting>SELECT ST_AsText(ST_LineMerge(
+ST_GeomFromText('MULTILINESTRING((-29 -27,-30 -29.7,-36 -31,-45 -33),(-45 -33,-46 -32))')
+               )
+);
+                       st_astext
+                       --------------------------------------------------------------------------------------------------
+                       LINESTRING(-29 -27,-30 -29.7,-36 -31,-45 -33,-46 -32)
+                       (1 row)
+       --If can't be merged - original MULTILINESTRING is returned             
+                       SELECT ST_AsText(ST_LineMerge(
+               ST_GeomFromText('MULTILINESTRING((-29 -27,-30 -29.7,-36 -31,-45 -33),(-45.2 -33.2,-46 -32))')
+                       )
+               );
+               st_astext
+               ----------------
+               MULTILINESTRING((-45.2 -33.2,-46 -32),(-29 -27,-30 -29.7,-36 -31,-45 -33))
+                       </programlisting>
+               </refsection>
+               <refsection>
+                       <title>See Also</title>
+                       <para><xref linkend="ST_Segmentize" />, <xref linkend="ST_Line_Substring" /></para>
+               </refsection>
+       </refentry>
                
        <refentry id="ST_Multi">
                <refnamediv>
@@ -2624,6 +2680,64 @@ LINESTRING(1 2,1 10) | LINESTRING(1 10,1 2)
 </programlisting>
          </refsection>
        </refentry>
+       
+       <refentry id="ST_Segmentize">
+               <refnamediv>
+                       <refname>ST_Segmentize</refname>
+                       
+                       <refpurpose>Return a modified geometry having no segment longer than the
+            given distance.  Distance computation is performed in 2d
+            only.</refpurpose>
+               </refnamediv>
+               
+               <refsynopsisdiv>
+                       <funcsynopsis>
+                         <funcprototype>
+                               <funcdef>geometry <function>ST_Segmentize</function></funcdef>
+                               <paramdef><type>geometry </type> <parameter>geomA</parameter></paramdef>
+                               <paramdef><type>float </type> <parameter>max_length</parameter></paramdef>
+                         </funcprototype>
+                       </funcsynopsis>
+               </refsynopsisdiv>
+       
+               <refsection>
+                       <title>Description</title>
+                       
+                       <para>Returns a modified geometry having no segment longer than the
+            given distance. Distance computation is performed in 2d
+            only. </para>
+                       <para>Availability: 1.2.2</para>
+                       <note><para>This will only increase segments.  It will not lengthen segments shorter than 
+                       max length</para></note>
+               </refsection>
+               
+               <refsection>
+                       <title>Examples</title>
+                       
+                       <programlisting>SELECT ST_AsText(ST_Segmentize(
+ST_GeomFromText('MULTILINESTRING((-29 -27,-30 -29.7,-36 -31,-45 -33),(-45 -33,-46 -32))')
+               ,5)
+);
+                       st_astext
+                       --------------------------------------------------------------------------------------------------
+                       MULTILINESTRING((-29 -27,-30 -29.7,-34.886615700134 -30.758766735029,-36 -31,
+                       -40.8809353009198 -32.0846522890933,-45 -33),
+                       (-45 -33,-46 -32))
+                       (1 row)
+                       
+                       SELECT ST_AsText(ST_Segmentize(ST_GeomFromText('POLYGON((-29 28, -30 40, -29 28))'),10));
+                       st_astext
+                       -----------------------
+                       POLYGON((-29 28,-29.8304547985374 37.9654575824488,-30 40,-29.1695452014626 30.0345424175512,-29 28))
+                       (1 row)
+       
+                       </programlisting>
+               </refsection>
+               <refsection>
+                       <title>See Also</title>
+                       <para><xref linkend="ST_Line_Substring" /></para>
+               </refsection>
+       </refentry>
 
        <refentry id="ST_SetPoint">
                  <refnamediv>