Name

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

Synopsis

geometry CG_Rotate(geometry geom, float8 angle);

Descrição

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.

Exemplos

SELECT ST_AsText(CG_Rotate('LINESTRING(1 0, 0 1)', pi()/2));
-- Result: LINESTRING(0 1, -1 0)

Veja também

CG_Rotate2D, ST_Rotate