Name

CG_RotateZ — Rotates a geometry around the Z-axis by a given angle.

Synopsis

geometry CG_RotateZ(geometry geom, float8 angle);

Description

Rotates the input geometry geom by angle radians around the Z-axis.

Availability: 3.6.0 - requires SFCGAL >= 2.0.0

This method needs SFCGAL backend.

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

Examples

Code
SELECT CG_RotateZ('POINT(1 0 0)', pi()/2);
Output
POINT Z (6.123233995736766e-17 1 0)
Figure
Geometry figure for visual-cg-rotatez-01