Rotates a geometry object by a specified number of radians about the x-axis.
Syntax
geometry ST_RotateX(geometry geomA, float rotRadians);Parameters
| Parameter | Description |
|---|---|
geomA | The geometry object to rotate. |
rotRadians | The rotation angle, in radians. |
Description
ST_RotateX(geomA, rotRadians)is shorthand forST_Affine(geomA, 1, 0, 0, 0, cos(rotRadians), -sin(rotRadians), 0, sin(rotRadians), or cos(rotRadians), 0, 0, 0).Supported geometry types include circular strings, curves, polyhedral surfaces, triangles, triangulated irregular network (TIN) surfaces, and 3D objects.
Examples
SELECT ST_AsEWKT(ST_RotateX('LINESTRING (1 2,2 2)'::geometry, pi()));
st_asewkt
-----------------------
LINESTRING(1 -2,2 -2)
(1 row)该文章对您有帮助吗?