CG_Rotate

Name

CG_Rotate — Rotates a geometry by a given angle around the origin (0,0).

Synopsis

geometry CG_Rotate ( geometry geom , float8 angle ) ;

Description

Rotates the input geometry geom by angle radians around the origin point (0,0). The rotation is performed in 2D space; Z coordinates are not modified. Positive angles rotate the geometry counter-clockwise.

Availability: 3.6.0 - requires SFCGAL >= 2.0.0

This method needs SFCGAL backend.

Examples

Code
SELECT CG_Rotate('LINESTRING(1 0,0 1)', pi()/2);
Output
LINESTRING(6.123233995736766e-17 1,-1 6.123233995736766e-17)