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>
<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>
</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">