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

postgis-commits at postgis.refractions.net postgis-commits at postgis.refractions.net
Tue Jul 15 23:42:00 PDT 2008


Author: kneufeld
Date: 2008-07-15 23:42:00 -0700 (Tue, 15 Jul 2008)
New Revision: 2863

Modified:
   trunk/doc/reference.xml
   trunk/doc/reference_new.xml
Log:
moved ST_Envelope, complete with examples.

Modified: trunk/doc/reference.xml
===================================================================
--- trunk/doc/reference.xml	2008-07-16 05:10:32 UTC (rev 2862)
+++ trunk/doc/reference.xml	2008-07-16 06:42:00 UTC (rev 2863)
@@ -476,24 +476,6 @@
         </varlistentry>
 
         <varlistentry>
-          <term>ST_Envelope(geometry)</term>
-
-          <listitem>
-            <para>Returns a vald geometry (POINT, LINESTRING or POLYGON)
-            representing the bounding box of the geometry. Degenerate cases
-            (vertical lines, point) will return a geometry of lower dimension
-            than POLYGON.</para>
-
-            <para>OGC SPEC s2.1.1.1 - The minimum bounding box for this
-            Geometry, returned as a Geometry. The polygon is defined by the
-            corner points of the bounding box ((MINX, MINY), (MAXX, MINY),
-            (MAXX, MAXY), (MINX, MAXY), (MINX, MINY)).</para>
-
-            <para>NOTE:PostGIS will add a Zmin/Zmax coordinate as well.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
           <term>ST_IsEmpty(geometry)</term>
 
           <listitem>
@@ -1095,18 +1077,6 @@
 
       <variablelist>
         <varlistentry>
-          <term>UpdateGeometrySRID([&lt;schema_name&gt;], &lt;table_name&gt;,
-          &lt;column_name&gt;, &lt;srid&gt;)</term>
-
-          <listitem>
-            <para>Update the SRID of all features in a geometry column
-            updating constraints and reference in geometry_columns. Note: uses
-            current_schema() on schema-aware pgsql installations if schema is
-            not provided.</para>
-          </listitem>
-        </varlistentry>
-
-        <varlistentry>
           <term>update_geometry_stats([&lt;table_name&gt;,
           &lt;column_name&gt;])</term>
 
@@ -2813,17 +2783,6 @@
       </varlistentry>
 
       <varlistentry>
-        <term>ST_Envelope</term>
-
-        <listitem>
-          <para>Return the bounding rectangle for the ST_Geometry
-          value.</para>
-
-          <para>SQL-MM 3: 5.1.15</para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
         <term>ST_Equals</term>
 
         <listitem>

Modified: trunk/doc/reference_new.xml
===================================================================
--- trunk/doc/reference_new.xml	2008-07-16 05:10:32 UTC (rev 2862)
+++ trunk/doc/reference_new.xml	2008-07-16 06:42:00 UTC (rev 2863)
@@ -412,6 +412,100 @@
    
   <sect1>
       <title>Geometry Accessors</title>
+      
+      <refentry id="ST_Envelope">
+  <refnamediv>
+    <refname>ST_Envelope</refname>
+
+    <refpurpose>Returns a geometry representing the bounding box of the
+    supplied geometry.</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <funcsynopsis>
+      <funcprototype>
+        <funcdef>boolean <function>ST_Envelope</function></funcdef>
+
+        <paramdef><type>geometry </type> <parameter>g1</parameter></paramdef>
+      </funcprototype>
+    </funcsynopsis>
+  </refsynopsisdiv>
+
+  <refsection>
+    <title>Description</title>
+
+    <para>Returns the minimum bounding box for the supplied geometry, as a geometry.
+    The polygon is defined by the corner points of the bounding box
+    ((<varname>MINX</varname>, <varname>MINY</varname>),
+    (<varname>MINX</varname>, <varname>MAXY</varname>),
+    (<varname>MAXX</varname>, <varname>MAXY</varname>),
+    (<varname>MAXX</varname>, <varname>MINY</varname>),
+    (<varname>MINX</varname>, <varname>MINY</varname>)). (PostGIS will add a
+    <varname>ZMIN</varname>/<varname>ZMAX</varname> coordinate as
+    well).</para>
+
+    <para>Degenerate cases (vertical lines, points) will return a geometry of
+    lower dimension than <varname>POLYGON</varname>, ie.
+    <varname>POINT</varname> or <varname>LINESTRING</varname>.</para>
+
+    <caution>
+      <para>In PostGIS, the bounding box of a geometry is represented internally using 
+      <varname>float4</varname>s instead of <varname>float8</varname>s that are used 
+      to store geometries.  The bounding box coordinates are floored, guarenteeing 
+      that the geometry is contained entirely within its bounds.  This has the 
+      advantage that a geometry's bounding box is half the size as the minimum
+      bounding rectangle, which means significantly faster indexes and general performance.  
+      But it also means that the bounding box is NOT the same as the minimum bounding 
+      rectangle that bounds the geometry.</para>
+    </caution>
+    
+    <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: v1.1: s2.1.1.1</ulink></para>
+
+    <para><inlinemediaobject>
+        <imageobject>
+          <imagedata fileref="images/check.png" />
+        </imageobject>
+      </inlinemediaobject> This method implements the SQL/MM specification:
+    SQL-MM 3: 5.1.15</para>
+  </refsection>
+
+  <refsection>
+    <title>Examples</title>
+
+    <programlisting>
+SELECT ST_AsText(ST_Envelope('POINT(1 3)'::geometry));
+ st_astext  
+------------
+ POINT(1 3)
+(1 row)
+
+
+SELECT ST_AsText(ST_Envelope('LINESTRING(0 0, 1 3)'::geometry));
+           st_astext            
+--------------------------------
+ POLYGON((0 0,0 3,1 3,1 0,0 0))
+(1 row)
+
+
+SELECT ST_AsText(ST_Envelope('POLYGON((0 0, 0 1, 1.0000001 1, 1.0000001 0, 0 0))'::geometry));
+                          st_astext                           
+--------------------------------------------------------------
+ POLYGON((0 0,0 1,1.00000011920929 1,1.00000011920929 0,0 0))
+(1 row)
+SELECT ST_AsText(ST_Envelope('POLYGON((0 0, 0 1, 1.0000000001 1, 1.0000000001 0, 0 0))'::geometry));
+                          st_astext                           
+--------------------------------------------------------------
+ POLYGON((0 0,0 1,1.00000011920929 1,1.00000011920929 0,0 0))
+(1 row)</programlisting>
+  </refsection>
+</refentry>
+      
   </sect1>
   
   <sect1>



More information about the postgis-commits mailing list