]> granicus.if.org Git - postgis/commitdiff
Move ST_Equals, ST_OrderingEquals - provide examples. Make Geometry - geometry
authorRegina Obe <lr@pcorp.us>
Tue, 15 Jul 2008 19:38:11 +0000 (19:38 +0000)
committerRegina Obe <lr@pcorp.us>
Tue, 15 Jul 2008 19:38:11 +0000 (19:38 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@2857 b70326c6-7e19-0410-871a-916f4a2858ee

doc/reference.xml
doc/reference_new.xml
doc/template.xml

index ba5b918c3a8301a82f12f8def353a166f92e24e8..41f8a4f8efed62a73cadc664d524f9f959c9a381 100644 (file)
           </listitem>
         </varlistentry>
 
-        <varlistentry>
-          <term>ST_Intersects(geometry, geometry)</term>
-
-          <listitem>
-            <para>Returns 1 (TRUE) if the Geometries "spatially
-            intersect".</para>
-
-            <para>Performed by the GEOS module</para>
-
-            <para>Do not call with a GeometryCollection as an argument</para>
-
-            <para>NOTE: this is the "allowable" version that returns a
-            boolean, not an integer.</para>
-
-            <para>OGC SPEC s2.1.1.2 // s2.1.13.3 - NOT disjoint(geometry,
-            geometry)</para>
-          </listitem>
-        </varlistentry>
-
         <varlistentry>
           <term>ST_Relate(geometry, geometry,
           intersectionPatternMatrix)</term>
@@ -3176,23 +3157,6 @@ WHERE n*100.00/length &lt; 1;
         </listitem>
       </varlistentry>
 
-      <varlistentry>
-        <term>ST_OrderingEquals</term>
-
-        <listitem>
-          <para>ST_OrderingEquals compares two geometries and t (TRUE) if the
-          geometries are equal and the coordinates are in the same order;
-          otherwise it returns f (FALSE).</para>
-
-          <note>
-            <para>This function is implemented as per the ArcSDE SQL
-            specification rather than SQL-MM.
-            http://edndoc.esri.com/arcsde/9.1/sql_api/sqlapi3.htm#ST_OrderingEquals</para>
-          </note>
-
-          <para>SQL-MM 3: 5.1.43</para>
-        </listitem>
-      </varlistentry>
 
       <varlistentry>
         <term>ST_Overlaps</term>
index 6d6232f53946008a50f9d97da878733836e2e4bf..38a6202bf4d7b3bad306d90aaaa01749dbbfc857 100644 (file)
@@ -276,7 +276,7 @@ Check constraints:
         <refname>UpdateGeometrySRID</refname>
 
         <refpurpose>Updates the SRID of all features in a geometry
-        column and also corrects the geometry_columns table and corrects the geometry constraints on the table.</refpurpose>
+        column, geometry_columns metadata and srid table constraint</refpurpose>
       </refnamediv>
 
       <refsynopsisdiv>
@@ -360,15 +360,15 @@ Check constraints:
                <refsynopsisdiv>
                <funcsynopsis>
                  <funcprototype>
-                       <funcdef>Geometry <function>ST_MakeLine</function></funcdef>
-                       <paramdef><type>Geometry set</type> <parameter>pointfield</parameter></paramdef>
+                       <funcdef>geometry <function>ST_MakeLine</function></funcdef>
+                       <paramdef><type>geometry set</type> <parameter>pointfield</parameter></paramdef>
                  </funcprototype>
                </funcsynopsis>
                <funcsynopsis>
                  <funcprototype>
-                       <funcdef>Geometry <function>ST_MakeLine</function></funcdef>
-                       <paramdef><type>Geometry</type> <parameter>point1</parameter></paramdef>
-                       <paramdef><type>Geometry</type> <parameter>point2</parameter></paramdef>
+                       <funcdef>geometry <function>ST_MakeLine</function></funcdef>
+                       <paramdef><type>geometry</type> <parameter>point1</parameter></paramdef>
+                       <paramdef><type>geometry</type> <parameter>point2</parameter></paramdef>
                  </funcprototype>
                </funcsynopsis>
                </refsynopsisdiv>
@@ -676,6 +676,69 @@ SELECT DISTINCT ON (s.gid) s.gid, s.school_name, s.the_geom, h.hospital_name
         <para><xref linkend="ST_Distance"/></para>
       </refsection>
     </refentry>
+
+       <refentry id="ST_Equals">
+         <refnamediv>
+               <refname>ST_Equals</refname>
+       
+               <refpurpose>Returns true if the given geometries represent the same geometry. Directionality 
+                       is ignored.</refpurpose>
+         </refnamediv>
+       
+         <refsynopsisdiv>
+               <funcsynopsis>
+                 <funcprototype>
+                       <funcdef>boolean <function>ST_Equals</function></funcdef>
+                       <paramdef><type>geometry </type> <parameter>A</parameter></paramdef>
+                       <paramdef><type>geometry </type> <parameter>B</parameter></paramdef>
+                 </funcprototype>
+               </funcsynopsis>
+         </refsynopsisdiv>
+       
+         <refsection>
+               <title>Description</title>
+       
+               <para>Returns TRUE if the given Geometries are "spatially
+            equal". Use this for a 'better' answer than '='.
+                       Note by spatially equal we also mean ordering of points can be different but
+                       represent the same geometry structure.  To verify the order of points is consistent, use 
+                       ST_OrderingEquals.</para>
+
+               <para>
+                 <inlinegraphic class="sfs_compliant" fileref="images/check.png" />
+                 This method implements the
+                 <ulink url="http://www.opengeospatial.org/standards/sfs">OpenGIS Simple
+                 Features Implementation Specification for SQL OGC SPEC s2.1.1.2<</ulink>
+               </para>
+       
+         </refsection>
+       
+         <refsection>
+               <title>Examples</title>
+       
+               <programlisting>SELECT ST_Equals(ST_GeomFromText('LINESTRING(0 0, 10 10)'),
+               ST_GeomFromText('LINESTRING(0 0, 5 5, 10 10)'));
+ st_equals
+-----------
+ t
+(1 row)
+
+SELECT ST_Equals(ST_Reverse(ST_GeomFromText('LINESTRING(0 0, 10 10)')),
+               ST_GeomFromText('LINESTRING(0 0, 5 5, 10 10)'));
+ st_equals
+-----------
+ t
+(1 row)
+</programlisting>
+         </refsection>
+
+         <refsection>
+               <title>See Also</title>
+       
+               <para><xref linkend="ST_OrderingEquals"/>, <xref linkend="ST_Reverse"/></para>
+         </refsection>
+         
+       </refentry>
        
        <refentry id="ST_Intersects">
                <refnamediv>
@@ -750,6 +813,78 @@ SELECT ST_Intersects('POINT(0 0)'::geometry, 'LINESTRING ( 0 0, 0 2 )'::geometry
                        <para><xref linkend="ST_Disjoint"/>ST_Disjoint</para>
                </refsection>
     </refentry>
+       <refentry id="ST_OrderingEquals">
+         <refnamediv>
+               <refname>ST_OrderingEquals</refname>
+       
+               <refpurpose>Returns true if the given geometries represent the same geometry 
+               and points are in the same directional order.</refpurpose>
+         </refnamediv>
+       
+         <refsynopsisdiv>
+               <funcsynopsis>
+                 <funcprototype>
+                       <funcdef>boolean <function>ST_OrderingEquals</function></funcdef>
+                       <paramdef><type>geometry </type> <parameter>A</parameter></paramdef>
+                       <paramdef><type>geometry </type> <parameter>B</parameter></paramdef>
+                 </funcprototype>
+               </funcsynopsis>
+         </refsynopsisdiv>
+       
+         <refsection>
+               <title>Description</title>
+       
+               <para>ST_OrderingEquals compares two geometries and t (TRUE) if the
+          geometries are equal and the coordinates are in the same order;
+          otherwise it returns f (FALSE).</para>
+                       
+               <note>
+                       <para>This function is implemented as per the ArcSDE SQL
+               specification rather than SQL-MM.
+               http://edndoc.esri.com/arcsde/9.1/sql_api/sqlapi3.htm#ST_OrderingEquals</para>
+               </note>
+
+               <para>
+                 <inlinegraphic class="sql_mm_compliant" fileref="images/check.png" />
+                 This method implements the SQL/MM specification: SQL-MM 3: 5.1.43
+               </para> 
+       
+         </refsection>
+       
+         <refsection>
+               <title>Examples</title>
+       
+               <programlisting>SELECT ST_OrderingEquals(ST_GeomFromText('LINESTRING(0 0, 10 10)'),
+               ST_GeomFromText('LINESTRING(0 0, 5 5, 10 10)'));
+ st_orderingequals
+-----------
+ f
+(1 row)
+
+SELECT ST_OrderingEquals(ST_GeomFromText('LINESTRING(0 0, 10 10)'),
+               ST_GeomFromText('LINESTRING(0 0, 0 0, 10 10)'));
+ st_orderingequals
+-----------
+ t
+(1 row)
+
+SELECT ST_OrderingEquals(ST_Reverse(ST_GeomFromText('LINESTRING(0 0, 10 10)')),
+               ST_GeomFromText('LINESTRING(0 0, 0 0, 10 10)'));
+ st_orderingequals
+-----------
+ f
+(1 row)
+</programlisting>
+         </refsection>
+
+
+         <refsection>
+               <title>See Also</title>
+       
+               <para><xref linkend="ST_Equals"/>, <xref linkend="ST_Reverse"/></para>
+         </refsection>
+         
+       </refentry>
   </sect1>
   
   <sect1>
index cf08c4fef1b3a27a3abd8dd1ba0e895f3381a32a..d9b9be68a2e3f5b9b0e703364dd2b2c5f3fde49e 100644 (file)
     <funcsynopsis>
       <funcprototype>
         <funcdef>boolean <function>ST_MyMethod</function></funcdef>
-        <paramdef><type>Geometry </type> <parameter>g1</parameter></paramdef>
-        <paramdef><type>Geometry </type> <parameter>g2</parameter></paramdef>
+        <paramdef><type>geometry </type> <parameter>g1</parameter></paramdef>
+        <paramdef><type>geometry </type> <parameter>g2</parameter></paramdef>
       </funcprototype>
 
       <!-- an optional second method prototype -->
       <funcprototype>
         <funcdef>boolean <function>ST_MyMethod</function></funcdef>
-        <paramdef><type>Geometry </type> <parameter>g1</parameter></paramdef>
-        <paramdef><type>Geometry </type> <parameter>g2</parameter></paramdef>
+        <paramdef><type>geometry </type> <parameter>g1</parameter></paramdef>
+        <paramdef><type>geometry </type> <parameter>g2</parameter></paramdef>
         <paramdef><type>varchar </type> <parameter>myparam</parameter></paramdef>
       </funcprototype>
     </funcsynopsis>