12.07.2015 Views

PostGIS 1.5.8 Manual - Fedora Project Packages GIT repositories

PostGIS 1.5.8 Manual - Fedora Project Packages GIT repositories

PostGIS 1.5.8 Manual - Fedora Project Packages GIT repositories

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>PostGIS</strong> <strong>1.5.8</strong> <strong>Manual</strong>139 / 310See Also<strong>PostGIS</strong>_Full_Version, ST_AsText, ST_SetSRID, UpdateGeometrySRID7.5.25 ST_TranslateST_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).Synopsisgeometry ST_Translate(geometry g1, float deltax, float deltay);geometry ST_Translate(geometry g1, float deltax, float deltay, float deltaz);DescriptionReturns a new geometry whose coordinates are translated delta x,delta y,delta z units. Units are based on the units defined inspatial reference (SRID) for this geometry.NotePrior to 1.3.4, this function crashes if used with geometries that contain CURVES. This is fixed in 1.3.4+Availability: 1.2.2This function supports 3d and will not drop the z-index.This method supports Circular Strings and CurvesExamplesMove a point 1 degree longitudeSELECT ST_AsText(ST_Translate(ST_GeomFromText(’POINT(-71.01 42.37)’,4326),1,0)) Aswgs_transgeomtxt;←↪wgs_transgeomtxt---------------------POINT(-70.01 42.37)Move a linestring 1 degree longitude and 1/2 degree latitudeSELECT 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)Move a 3d pointSELECT ST_AsEWKT(ST_Translate(CAST(’POINT(0 0 0)’ As geometry), 5, 12,3));st_asewkt---------POINT(5 12 3)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!