Name

CG_Scale — Scales a geometry uniformly in all dimensions by a given factor.

Synopsis

geometry CG_Scale(geometry geom, float8 factor);

Description

Scales the input geometry geom by a uniform scale factor in all dimensions (X, Y, and Z). The scaling is performed relative to the origin point (0,0,0).

Availability: 3.6.0 - requires SFCGAL >= 2.0.0

This method needs SFCGAL backend.

Examples

SELECT ST_AsText(CG_Scale('LINESTRING(1 1, 2 2)', 2));
-- Result: LINESTRING(2 2, 4 4)