]> granicus.if.org Git - postgis/commitdiff
Move ST_Reverse and add example
authorRegina Obe <lr@pcorp.us>
Thu, 17 Jul 2008 14:16:17 +0000 (14:16 +0000)
committerRegina Obe <lr@pcorp.us>
Thu, 17 Jul 2008 14:16:17 +0000 (14:16 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@2868 b70326c6-7e19-0410-871a-916f4a2858ee

doc/reference.xml
doc/reference_new.xml

index 8b29396b760c93f2399e38b2d0da9103d8c47c57..def0c435a660fdeca5b68dbe892998e656a8cc2e 100644 (file)
@@ -2014,14 +2014,6 @@ z' = z </programlisting> This method is a subcase of the 3D method
           </listitem>
         </varlistentry>
 
-        <varlistentry id="ST_Reverse">
-          <term>ST_Reverse(geometry)</term>
-
-          <listitem>
-            <para>Returns the geometry with vertex order reversed.</para>
-          </listitem>
-        </varlistentry>
-
         <varlistentry>
           <term>ST_ForceRHR(geometry)</term>
 
index 77e465b631953975ef8af107c6ccd8f0042e2948..72e36fa527376e8c50915c0ab608aa4767124e33 100644 (file)
@@ -569,18 +569,17 @@ SELECT gps.gps_track, ST_MakeLine(gps.the_geom) As newgeom
        GROUP BY gps.gps_track</programlisting>
                </refsection>
                <refsection>
-               <title>Examples: Non-Spatial Aggregate version</title>
-               
-               <para>First example is a simple one off line string composed of 2 points.  The second formulates
-                       line strings from 2 points a user draws</para>
-               <programlisting>
+                       <title>Examples: Non-Spatial Aggregate version</title>
+                       
+                       <para>First example is a simple one off line string composed of 2 points.  The second formulates
+                               line strings from 2 points a user draws</para>
+                       <programlisting>
 SELECT ST_AsText(ST_MakeLine(ST_MakePoint(1,2), ST_MakePoint(3,4)));
 SELECT userpoints.id, ST_MakeLine(startpoint, endpoint) As drawn_line
-FROM userpoints ;
-               </programlisting>
+       FROM userpoints ;
+                       </programlisting>
                </refsection>
-               
-               </refentry>  
+       </refentry>
   </sect1>
    
   <sect1>
@@ -683,7 +682,41 @@ SELECT ST_AsText(ST_Envelope('POLYGON((0 0, 0 1, 1.0000000001 1, 1.0000000001 0,
   
   <sect1>
       <title>Geometry Editors</title>
-      
+       <refentry id="ST_Reverse">
+         <refnamediv>
+               <refname>ST_Reverse</refname>
+               <refpurpose>Returns the geometry with vertex order reversed.</refpurpose>
+         </refnamediv>
+       
+         <refsynopsisdiv>
+               <funcsynopsis>
+                 <funcprototype>
+                       <funcdef>geometry <function>ST_Reverse</function></funcdef>
+                       <paramdef><type>geometry </type> <parameter>g1</parameter></paramdef>
+                 </funcprototype>
+                </funcsynopsis>
+         </refsynopsisdiv>
+       
+         <refsection>
+               <title>Description</title>
+       
+               <para>Can be used on any geometry and reverses the order of the vertexes.</para>
+         </refsection>
+       
+         <refsection>
+               <title>Examples</title> 
+               <programlisting>
+SELECT ST_AsText(the_geom) as line, ST_AsText(ST_Reverse(the_geom)) As reverseline
+FROM
+(SELECT ST_MakeLine(ST_MakePoint(1,2), 
+               ST_MakePoint(1,10)) As the_geom) as foo;
+--result
+        line         |     reverseline
+---------------------+----------------------
+LINESTRING(1 2,1 10) | LINESTRING(1 10,1 2)
+</programlisting>
+         </refsection>
+       </refentry> 
     <refentry id="ST_SetSRID">
       <refnamediv>
         <refname>ST_SetSRID</refname>
@@ -1267,7 +1300,7 @@ SELECT ST_Intersects('POINT(0 0)'::geometry, 'LINESTRING ( 0 0, 0 2 )'::geometry
                </refsection>
                <refsection>
                        <title>See Also</title>
-                       <para><xref linkend="ST_Disjoint"/>ST_Disjoint</para>
+                       <para><xref linkend="ST_Disjoint"/></para>
                </refsection>
     </refentry>
        <refentry id="ST_OrderingEquals">