<sect2>
<title>Geometry Processing Functions</title>
-
- <variablelist>
- <varlistentry>
- <term>ST_Area(geometry)</term>
-
- <listitem>
- <para>Returns the area of the geometry if it is a polygon or
- multi-polygon.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>ST_Length(geometry)</term>
-
- <listitem>
- <para>The length of this Curve in its associated spatial
- reference.</para>
-
- <para>synonym for length2d()</para>
-
- <para>OGC SPEC 2.1.5.1</para>
- </listitem>
- </varlistentry>
-
+ <variablelist>
<varlistentry>
<term>ST_Boundary(geometry)</term>
strings.</para>
</listitem>
</varlistentry>
-
- <varlistentry>
- <term>ST_perimeter(geometry)</term>
-
- <listitem>
- <para>Returns the 2-dimensional perimeter of the geometry, if it
- is a polygon or multi-polygon.</para>
- </listitem>
- </varlistentry>
-
<varlistentry>
<term>ST_perimeter2d(geometry)</term>
</listitem>
</varlistentry>
- <varlistentry>
- <term>ST_Length</term>
-
- <listitem>
- <para>Return the length measurement of an ST_Curve or ST_MultiCurve
- value.</para>
-
- <para>SQL-MM 3: 7.1.2, 9.3.4</para>
- </listitem>
- </varlistentry>
-
<varlistentry>
<term>ST_LineFromText</term>
</listitem>
</varlistentry>
- <varlistentry>
- <term>ST_Perimeter</term>
-
- <listitem>
- <para>Return the length measurement of the boundary of an ST_Surface
- or ST_MultiRSurface value.</para>
-
- <para>SQL-MM 3: 8.1.3, 9.5.4</para>
- </listitem>
- </varlistentry>
-
<varlistentry>
<term>ST_Point</term>
<title>See Also</title>
<para><xref linkend="ST_Disjoint"/></para>
</refsection>
- </refentry>
+ </refentry>
+ <refentry id="ST_Length">
+ <refnamediv>
+ <refname>ST_Length</refname>
+
+ <refpurpose>Returns the 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>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
+ <refsection>
+ <title>Description</title>
+
+ <para>Returns the 2D length of the geometry if it is a linestring, multilinestring, ST_Curve, ST_MultiCurve. 0 is returned for
+ areal geometries. For areal geometries use ST_Perimeter. Measurements are in the units of the
+ spatial reference system of the geometry.</para>
+
+ <para>Currently this is an alias for ST_Length2D, but this may change to support higher dimensions.</para>
+
+ <para><inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/check.png" />
+ </imageobject>
+ </inlinemediaobject> This method implements the <ulink
+ url="http://www.opengeospatial.org/standards/sfs">OpenGIS Simple Features
+ Implementation Specification for SQL. OGC SPEC 2.1.5.1</ulink></para>
+
+ <para><inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/check.png" />
+ </imageobject>
+ </inlinemediaobject> This method implements the SQL/MM specification:
+ SQL-MM 3: 7.1.2, 9.3.4</para>
+ </refsection>
+
+ <refsection>
+ <title>Examples</title>
+ <para>Return length in feet for line string. Note this is in feet because 2249 is
+ Mass State Plane Feet</para>
+ <programlisting>
+SELECT SELECT ST_Length(ST_GeomFromText('LINESTRING(743238 2967416,743238 2967450,743265 2967450,
+743265.625 2967416,743238 2967416)',2249));
+st_length
+---------
+ 122.630744000095
+(1 row)
+ </programlisting>
+ </refsection>
+ <refsection>
+ <title>See Also</title>
+ <para><xref linkend="ST_Perimeter" /></para>
+ </refsection>
+ </refentry>
+
<refentry id="ST_OrderingEquals">
<refnamediv>
<refname>ST_OrderingEquals</refname>
<para><xref linkend="ST_Equals"/>, <xref linkend="ST_Reverse"/></para>
</refsection>
-
</refentry>
+ <refentry id="ST_Perimeter">
+ <refnamediv>
+ <refname>ST_Perimeter</refname>
+
+ <refpurpose>Return the length measurement of the boundary of an ST_Surface
+ or ST_MultiSurface value. (Polygon, Multipolygon)</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>float <function>ST_Length</function></funcdef>
+ <paramdef><type>geometry </type><parameter>g1</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ </refsynopsisdiv>
+ <refsection>
+ <title>Description</title>
+
+ <para>Returns the 2D perimeter of the geometry if it is a ST_Surface, ST_MultiSurface (Polygon, Multipolygon). 0 is returned for
+ non-areal geometries. For linestrings use ST_Length. Measurements are in the units of the
+ spatial reference system of the geometry.</para>
+
+ <para>Currently this is an alias for ST_Perimeter2D, but this may change to support higher dimensions.</para>
+
+ <para><inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/check.png" />
+ </imageobject>
+ </inlinemediaobject> This method implements the <ulink
+ url="http://www.opengeospatial.org/standards/sfs">OpenGIS Simple Features
+ Implementation Specification for SQL. OGC SPEC 2.1.5.1</ulink></para>
+
+ <para><inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/check.png" />
+ </imageobject>
+ </inlinemediaobject> This method implements the SQL/MM specification:
+ SQL-MM 3: 8.1.3, 9.5.4</para>
+ </refsection>
+
+ <refsection>
+ <title>Examples</title>
+ <para>Return perimeter in feet for polygon and multipolygon. Note this is in feet because 2249 is
+ Mass State Plane Feet</para>
+ <programlisting>
+SELECT ST_Perimeter(ST_GeomFromText('POLYGON((743238 2967416,743238 2967450,743265 2967450,
+743265.625 2967416,743238 2967416))', 2249));
+st_perimeter
+---------
+ 122.630744000095
+(1 row)
+
+SELECT ST_Perimeter(ST_GeomFromText('MULTIPOLYGON(((763104.471273676 2949418.44119003,
+763104.477769673 2949418.42538203,
+763104.189609677 2949418.22343004,763104.471273676 2949418.44119003)),
+((763104.471273676 2949418.44119003,763095.804579742 2949436.33850239,
+763086.132105649 2949451.46730207,763078.452329651 2949462.11549407,
+763075.354136904 2949466.17407812,763064.362142565 2949477.64291974,
+763059.953961626 2949481.28983009,762994.637609571 2949532.04103014,
+762990.568508415 2949535.06640477,762986.710889563 2949539.61421415,
+763117.237897679 2949709.50493431,763235.236617789 2949617.95619822,
+763287.718121842 2949562.20592617,763111.553321674 2949423.91664605,
+763104.471273676 2949418.44119003)))', 2249));
+st_perimeter
+---------
+ 845.227713366825
+(1 row)
+ </programlisting>
+ </refsection>
+ <refsection>
+ <title>See Also</title>
+ <para><xref linkend="ST_Length" /></para>
+ </refsection>
+ </refentry>
+
<refentry id="ST_PointOnSurface">
<refnamediv>
<refname>ST_PointOnSurface</refname>