This topic describes the ST_TransScale function. This function returns a new object whose coordinates values are offset by specified units and scaled by specified factors.
Syntax
geometry ST_TransScale(geometry geomA , float deltaX , float deltaY , float xFactor , float yFactor);
Parameters
Parameter | Description |
---|---|
geomA | The geometry object that you want to specify. |
deltaX | The offset units of the delta x. |
deltaY | The offset units of the delta y. |
xFactor | The scale factor of the delta x. |
yFactor | The scale factor of the delta y. |
Description
- The ST_TransScale function returns a new object whose coordinates values are offset by specified units and scaled by specified factors.
- The ST_TransScale function is available only for 2D objects.
- The ST_TransScale function supports 3D objects and does not delete z coordinates.
- The ST_TransScale function supports circular strings and curves.
Examples
SELECT ST_AsEWKT(ST_TransScale(ST_GeomFromText('LINESTRING(2 1,1 1)',4326),1,1,2,2));
st_asewkt
-------------------------------
SRID=4326;LINESTRING(6 4,4 4)
(1 row)