[postgis-commits] svn - r2873 - trunk/doc

postgis-commits at postgis.refractions.net postgis-commits at postgis.refractions.net
Mon Jul 21 09:20:28 PDT 2008


Author: robe
Date: 2008-07-21 09:20:28 -0700 (Mon, 21 Jul 2008)
New Revision: 2873

Modified:
   trunk/doc/reference.xml
   trunk/doc/reference_new.xml
Log:
Remove ST_Area2D and replace with ST_Area - move to new section and provide example

Modified: trunk/doc/reference.xml
===================================================================
--- trunk/doc/reference.xml	2008-07-21 13:41:31 UTC (rev 2872)
+++ trunk/doc/reference.xml	2008-07-21 16:20:28 UTC (rev 2873)
@@ -1254,17 +1254,7 @@
 
     <sect2>
       <title>Measurement Functions</title>
-
-      <variablelist>
-        <varlistentry>
-          <term>ST_area2d(geometry)</term>
-
-          <listitem>
-            <para>Returns the area of the geometry if it is a polygon or
-            multi-polygon.</para>
-          </listitem>
-        </varlistentry>
-
+	  <variablelist>
         <varlistentry id="ST_Distance_Sphere">
           <term>ST_Distance_Sphere(point, point)</term>
 
@@ -2394,17 +2384,6 @@
 
     <variablelist>
       <varlistentry>
-        <term>ST_Area</term>
-
-        <listitem>
-          <para>Return the area measurement of an ST_Surface or
-          ST_MultiSurface value.</para>
-
-          <para>SQL-MM 3: 8.1.2, 9.5.3</para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
         <term>ST_AsBinary</term>
 
         <listitem>

Modified: trunk/doc/reference_new.xml
===================================================================
--- trunk/doc/reference_new.xml	2008-07-21 13:41:31 UTC (rev 2872)
+++ trunk/doc/reference_new.xml	2008-07-21 16:20:28 UTC (rev 2873)
@@ -1106,8 +1106,72 @@
   
   
   <sect1>
-    <title>Spatial Relationships and Measurements</title>
+  	<title>Spatial Relationships and Measurements</title>
+	<refentry id="ST_Area">
+		<refnamediv>
+		  <refname>ST_Area</refname>
+	
+		  <refpurpose>Returns the area of the geometry if it is a polygon or
+				multi-polygon.</refpurpose>
+		</refnamediv>
+		<refsynopsisdiv>
+		  <funcsynopsis>
+			<funcprototype>
+			  <funcdef>float <function>ST_Area</function></funcdef>
+			  	<paramdef><type>geometry </type><parameter>g1</parameter></paramdef>
+			</funcprototype>
+		  </funcsynopsis>
+		</refsynopsisdiv>
+		<refsection>
+			<title>Description</title>
+			
+			<para>Returns the area of the geometry if it is a polygon or
+				multi-polygon. Return the area measurement of an ST_Surface or
+          ST_MultiSurface value. Area is in the units of the spatial reference system.</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.</ulink></para>
+			
+			<para><inlinemediaobject>
+				<imageobject>
+				  <imagedata fileref="images/check.png" />
+				</imageobject>
+			  </inlinemediaobject> This method implements the SQL/MM specification:
+			SQL-MM 3: 8.1.2, 9.5.3</para>
+		</refsection>
+		
+		  <refsection>
+			<title>Examples</title>
+			<para>Return area in square feet for a plot of Massachusetts land. Note this is in square feet because 2249 is
+				Mass State Plane Feet</para>
+			<programlisting>
+SELECT ST_Area(ST_GeomFromText('POLYGON((743238 2967416,743238 2967450,
+	743265 2967450,743265.625 2967416,743238 2967416))',2249));
+st_area
+---------
+ 928.625
+(1 row)
 
+--this returns in square meters
+SELECT ST_Area(ST_Transform(ST_GeomFromText('POLYGON((743238 2967416,743238 2967450,
+	743265 2967450,743265.625 2967416,743238 2967416))',2249), 26986));
+st_area
+------------------
+ 86.2724306061864
+			</programlisting>
+		  </refsection>
+		<refsection>
+			<title>See Also</title>
+			<para><xref linkend="ST_GeomFromText" />, <xref linkend="ST_SetSRID" />,<xref linkend="ST_Transform" /></para>
+		</refsection>
+
+	</refentry>
+
     
   <refentry id="ST_Crosses">
     <refnamediv>



More information about the postgis-commits mailing list