</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>
<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>
</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>