Name
ST_RotateY — Rotate a geometry rotRadians about the Y axis.
Synopsis
geometry ST_RotateY(
geometry geomA, float rotRadians)
;
Description
Rotate a geometry geomA - rotRadians about the y axis.
| |
---|
ST_RotateY(geomA, rotRadians)
is short-hand for ST_Affine(geomA, cos(rotRadians), 0, sin(rotRadians), 0, 1, 0, -sin(rotRadians), 0, cos(rotRadians), 0, 0, 0) .
|
Availability: 1.1.2. Name changed from RotateY to ST_RotateY in 1.2.2
This function supports 3d and will not drop the z-index.
Examples
--Rotate a line 90 degrees along y-axis
SELECT ST_AsEWKT(ST_RotateY(ST_GeomFromEWKT('LINESTRING(1 2 3, 1 1 1)'), pi()/2));
st_asewkt
---------------------------
LINESTRING(3 2 -1,1 1 -1)