Name

CG_Translate3D — Translates (moves) a geometry by given offsets in 3D space.

Synopsis

geometry CG_Translate3D(geometry geom, float8 deltaX, float8 deltaY, float8 deltaZ);

描述

Translates the input geometry geom by adding deltaX to the X coordinates, deltaY to the Y coordinates, and deltaZ to the Z coordinates.

Availability: 3.6.0 - requires SFCGAL >= 2.0.0

该方法需要SFCGAL后端。

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

示例

SELECT ST_AsText(CG_Translate3D('POINT(1 1 1)', 1, -1, 2));
-- Result: POINT(2 0 3)