Appearance
ST_TRANSLATE
Translates a GEOGRAPHY object by applying specified offsets to its coordinates.
See also:
Syntax
sql
ST_TRANSLATE(<input>, <offset_x>, <offset_y>)Arguments
<input>: AGEOGRAPHYobject to translate.<offset_x>: AFLOAT8value representing the offset to apply to the x-coordinates.<offset_y>: AFLOAT8value representing the offset to apply to the y-coordinates.
Returns
Returns a GEOGRAPHY of the same type as the input, with its coordinates translated by the specified delta values.
Example
sql
SELECT ST_AsText(ST_TRANSLATE('POINT(1 1)'::GEOGRAPHY, 10, -5));
-- 'POINT(11 -4)'
SELECT ST_AsText(ST_TRANSLATE('LINESTRING(0 0, 1 1)'::GEOGRAPHY, 2, 3));
-- 'LINESTRING(2 3, 3 4)'