Name

CG_Translate2D — Translates (moves) a geometry by given offsets in 2D space.

Synopsis

geometry CG_Translate2D(geometry geom, float8 deltaX, float8 deltaY);

설명

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

Availability: 3.6.0 - requires SFCGAL >= 2.0.0

This method needs SFCGAL backend.

예시

SELECT ST_AsText(CG_Translate2D('LINESTRING(1 1, 2 2)', 1, -1));
-- Result: LINESTRING(2 0, 3 1)