Name

CG_Scale3D — Scales a geometry by separate factors along X, Y, and Z axes.

Synopsis

geometry CG_Scale3D(geometry geom, float8 factorX, float8 factorY, float8 factorZ);

描述

Scales the input geometry geom by different factors along the X, Y, and Z axes. The scaling is performed relative to the origin point (0,0,0).

Availability: 3.6.0 - requires SFCGAL >= 2.0.0

该方法需要SFCGAL后端。

该函数支持 3d 并且不会丢失 z-index。

示例

SELECT ST_AsText(CG_Scale3D('POINT(1 1 1)', 2, 3, 4));
-- Result: POINT(2 3 4)