From: Regina Obe Date: Thu, 17 Jul 2008 14:16:17 +0000 (+0000) Subject: Move ST_Reverse and add example X-Git-Tag: 1.4.0b1~831 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=52cb39bd8291ef080cc99acada9fdffcbb84dba3;p=postgis Move ST_Reverse and add example git-svn-id: http://svn.osgeo.org/postgis/trunk@2868 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/doc/reference.xml b/doc/reference.xml index 8b29396b7..def0c435a 100644 --- a/doc/reference.xml +++ b/doc/reference.xml @@ -2014,14 +2014,6 @@ z' = z This method is a subcase of the 3D method - - ST_Reverse(geometry) - - - Returns the geometry with vertex order reversed. - - - ST_ForceRHR(geometry) diff --git a/doc/reference_new.xml b/doc/reference_new.xml index 77e465b63..72e36fa52 100644 --- a/doc/reference_new.xml +++ b/doc/reference_new.xml @@ -569,18 +569,17 @@ SELECT gps.gps_track, ST_MakeLine(gps.the_geom) As newgeom GROUP BY gps.gps_track - Examples: Non-Spatial Aggregate version - - First example is a simple one off line string composed of 2 points. The second formulates - line strings from 2 points a user draws - + Examples: Non-Spatial Aggregate version + + First example is a simple one off line string composed of 2 points. The second formulates + line strings from 2 points a user draws + 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 ; - + FROM userpoints ; + - - + @@ -683,7 +682,41 @@ SELECT ST_AsText(ST_Envelope('POLYGON((0 0, 0 1, 1.0000000001 1, 1.0000000001 0, Geometry Editors - + + + ST_Reverse + Returns the geometry with vertex order reversed. + + + + + + geometry ST_Reverse + geometry g1 + + + + + + Description + + Can be used on any geometry and reverses the order of the vertexes. + + + + Examples + +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) + + + ST_SetSRID @@ -1267,7 +1300,7 @@ SELECT ST_Intersects('POINT(0 0)'::geometry, 'LINESTRING ( 0 0, 0 2 )'::geometry See Also - ST_Disjoint +