CG_Rotate — Rotates a geometry by a given angle around the origin (0,0).
geometry CG_Rotate(
geometry geom, float8 angle)
;
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
Questo metodo richiede il backend SFCGAL.
SELECT ST_AsText(CG_Rotate('LINESTRING(1 0, 0 1)', pi()/2)); -- Result: LINESTRING(0 1, -1 0)