Name

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

Übersicht

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

Beschreibung

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

Diese Methode benötigt ein SFCGAL-Backend.

Beispiele

Code
SELECT CG_Translate('LINESTRING(1 1,2 2)', 1, -1);
Ausgabe von Rastern
LINESTRING(2 0,3 1)
Figure
Geometry figure for visual-cg-translate-01