From: Regina Obe Date: Mon, 8 Sep 2008 13:12:59 +0000 (+0000) Subject: Move over ST_Translate and provide example use X-Git-Tag: 1.4.0b1~758 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4de0242aec52ad118cf59c166020abe578b836a3;p=postgis Move over ST_Translate and provide example use git-svn-id: http://svn.osgeo.org/postgis/trunk@2946 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/doc/reference.xml b/doc/reference.xml index 98b244c23..952c121d2 100644 --- a/doc/reference.xml +++ b/doc/reference.xml @@ -1203,15 +1203,6 @@ z' = z This method is a subcase of the 3D method - - ST_Translate(geometry, float8, float8, float8) - - - Translates the geometry to a new location using the numeric - parameters as offsets. Ie: translate(geom, X, Y, Z). - - - ST_Scale(geometry, float8, float8, float8) diff --git a/doc/reference_new.xml b/doc/reference_new.xml index e4334af34..7b26a3dc8 100644 --- a/doc/reference_new.xml +++ b/doc/reference_new.xml @@ -2606,6 +2606,66 @@ CREATE INDEX idx_the_geom_26986_parcels , , + + + + ST_Translate + + Translates the geometry to a new location using the numeric + parameters as offsets. Ie: ST_Translate(geom, X, Y) or ST_Translate(geom, X, Y,Z). + + + + + + geometry ST_Translate + geometry g1 + float deltax + float deltay + + + geometry ST_Translate + geometry g1 + float deltax + float deltay + float deltaz + + + + + + Description + + Returns a new geometry whose coordinates are translated delta x,delta y,delta z units. Units are + based on the units defined in spatial reference (SRID) for this geometry. + + Availability: 1.2.2 + + + + Examples + Move a point 1 degree longitude + + SELECT ST_AsText(ST_Translate(ST_GeomFromText('POINT(-71.01 42.37)',4326),1,0)) As wgs_transgeomtxt; + + wgs_transgeomtxt + --------------------- + POINT(-70.01 42.37) + + Move a linestring 1 degree longitude and 1/2 degree latitude + SELECT ST_AsText(ST_Translate(ST_GeomFromText('LINESTRING(-71.01 42.37,-71.11 42.38)',4326),1,0.5)) As wgs_transgeomtxt; + wgs_transgeomtxt + --------------------------------------- + LINESTRING(-70.01 42.87,-70.11 42.88) + + + + + + See Also + , + +