Name

ST_RotateX — 绕X轴旋转几何图形。

Synopsis

geometry ST_RotateX(geometry geomA, float rotRadians);

描述

绕X轴旋转几何图形A-rotRadians。

[Note]

ST_RotateX(geomA, rotRadians) 是以下的缩写 ST_Affine(geomA, 1, 0, 0, 0, cos(rotRadians), -sin(rotRadians), 0, sin(rotRadians), cos(rotRadians), 0, 0, 0)

增强:2.0.0引入了对多面体曲面、三角形和三角网的支持。

可用性:1.1.2。在1.2.2中将名称从RotateX更改为ST_RotateX

This function supports Polyhedral surfaces.

This function supports 3d and will not drop the z-index.

This function supports Triangles and Triangulated Irregular Network Surfaces (TIN).

示例

--Rotate a line 90 degrees along x-axis
SELECT ST_AsEWKT(ST_RotateX(ST_GeomFromEWKT('LINESTRING(1 2 3, 1 1 1)'), pi()/2));
                 st_asewkt
---------------------------
 LINESTRING(1 -3 2,1 -1 1)

另请参阅

ST_Affine, ST_RotateY, ST_RotateZ