Nome

ST_WrapX — Wrap a geometry around an X value.

Sinossi

geometry ST_WrapX(geometry geom, float8 wrap, float8 move);

Descrizione

This function splits the input geometries and then moves every resulting component falling on the right (for negative 'move') or on the left (for positive 'move') of given 'wrap' line in the direction specified by the 'move' parameter, finally re-unioning the pieces together.

[Nota]

This is useful to "recenter" long-lat input to have features of interest not spawned from one side to the other.

Availability: 2.3.0 requires GEOS

Questa funzione supporta il 3d e non distrugge gli z-index.

Esempi

Move all components whose bounding boxes fall completely to the left of x = 0 by +360.

Code
SELECT ST_WrapX(geom, 0, 360);

Move all components whose bounding boxes fall completely to the left of x = -30 by +360.

Code
SELECT ST_WrapX(geom, -30, 360);

Si veda anche

ST_ShiftLongitude