]> granicus.if.org Git - postgis/commitdiff
Move over ST_length2d, ST_length3d
authorRegina Obe <lr@pcorp.us>
Fri, 17 Oct 2008 17:58:53 +0000 (17:58 +0000)
committerRegina Obe <lr@pcorp.us>
Fri, 17 Oct 2008 17:58:53 +0000 (17:58 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@3136 b70326c6-7e19-0410-871a-916f4a2858ee

doc/reference.xml
doc/reference_new.xml

index a4d35fef6febdb4384a856a182dbe08cc2671e57..4883e479b7c9065fd0a948d416deb4026dd4aa88 100644 (file)
           </listitem>
         </varlistentry>
 
-        <varlistentry id="length2d">
-          <term>ST_length2d(geometry)</term>
-
-          <listitem>
-            <para>Returns the 2-dimensional length of the geometry if it is a
-            linestring or multi-linestring.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
-          <term>ST_length3d(geometry)</term>
-
-          <listitem>
-            <para>Returns the 3-dimensional length of the geometry if it is a
-            linestring or multi-linestring.</para>
-          </listitem>
-        </varlistentry>
-
         <varlistentry id="length_spheroid">
           <term>ST_length_spheroid(geometry,spheroid)</term>
 
index 7f23363f6047a7dd2d1f06312de34d243e07738c..1e4cca359ea30ff54c289cd5a73351c61127a0e0 100644 (file)
@@ -4827,13 +4827,13 @@ SELECT ST_Intersects('POINT(0 0)'::geometry, 'LINESTRING ( 0 0, 0 2 )'::geometry
                <refnamediv>
                  <refname>ST_Length</refname>
        
-                 <refpurpose>Returns the length of the geometry if it is a linestring or multilinestring.</refpurpose>
+                 <refpurpose>Returns the 2d length of the geometry if it is a linestring or multilinestring.</refpurpose>
                </refnamediv>
                <refsynopsisdiv>
                  <funcsynopsis>
                        <funcprototype>
                          <funcdef>float <function>ST_Length</function></funcdef>
-                               <paramdef><type>geometry </type><parameter>g1</parameter></paramdef>
+                               <paramdef><type>geometry </type><parameter>a_2dlinestring</parameter></paramdef>
                        </funcprototype>
                  </funcsynopsis>
                </refsynopsisdiv>
@@ -4881,6 +4881,94 @@ st_length
                </refsection>
        </refentry>
        
+       <refentry id="ST_Length2D">
+         <refnamediv>
+               <refname>ST_Length2D</refname>
+       
+               <refpurpose>Returns the 2-dimensional length of the geometry if it is a
+                               linestring or multi-linestring. This is an alias for <varname>ST_Length</varname></refpurpose>
+         </refnamediv>
+       
+         <refsynopsisdiv>
+               <funcsynopsis>
+                 <funcprototype>
+                       <funcdef>float <function>ST_Length2D</function></funcdef>
+                       <paramdef><type>geometry </type> <parameter>a_2dlinestring</parameter></paramdef>
+                 </funcprototype>
+               </funcsynopsis>
+         </refsynopsisdiv>
+       
+         <refsection>
+               <title>Description</title>
+       
+               <para>Returns the 2-dimensional length of the geometry if it is a
+                               linestring or multi-linestring. This is an alias for <varname>ST_Length</varname></para>
+       
+         </refsection>
+       
+         <!-- Optionally add a "See Also" section -->
+         <refsection>
+               <title>See Also</title>
+       
+               <para><xref linkend="ST_Length" />, <xref linkend="ST_Length3D" /></para>
+         </refsection>
+       </refentry>
+
+       <refentry id="ST_Length3D">
+         <refnamediv>
+           <refname>ST_Length3D</refname>
+       
+           <refpurpose>Returns the 3-dimensional or 2-dimensional length of the geometry if it is a
+            linestring or multi-linestring. </refpurpose>
+         </refnamediv>
+       
+         <refsynopsisdiv>
+           <funcsynopsis>
+             <funcprototype>
+               <funcdef>float <function>ST_Length3D</function></funcdef>
+               <paramdef><type>geometry </type> <parameter>a_3dlinestring</parameter></paramdef>
+             </funcprototype>
+           </funcsynopsis>
+         </refsynopsisdiv>
+       
+         <refsection>
+           <title>Description</title>
+       
+           <para>Returns the 3-dimensional or 2-dimensional length of the geometry if it is a
+            linestring or multi-linestring. For 2-d lines it will just return the 2-d length (same as ST_Length and ST_Length2d)</para>
+       
+               <!-- Optionally mention 3d support -->
+           <para><inlinemediaobject>
+               <imageobject>
+                 <imagedata fileref="images/check.png" />
+               </imageobject>
+             </inlinemediaobject> This function supports 3d and will not drop the z-index.</para>
+         </refsection>
+         
+       
+         <refsection>
+           <title>Examples</title>
+       
+               <para>Return length in feet for a 3D cable. Note this is in feet because 2249 is
+                               Mass State Plane Feet</para>
+               <programlisting>
+SELECT ST_Length3D(ST_GeomFromText('LINESTRING(743238 2967416 1,743238 2967450 1,743265 2967450 3,
+743265.625 2967416 3,743238 2967416 3)',2249));
+st_length3d
+-----------
+122.704716741457
+               </programlisting>
+         </refsection>
+       
+         <!-- Optionally add a "See Also" section -->
+         <refsection>
+           <title>See Also</title>
+       
+           <para><xref linkend="ST_Length" />, <xref linkend="ST_Length2D" /></para>
+         </refsection>
+       </refentry>
+
+       
        <refentry id="ST_OrderingEquals">
          <refnamediv>
                <refname>ST_OrderingEquals</refname>