Name

ST_WrapX — 将几何体环绕在X值周围。

Synopsis

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

描述

此函数拆分输入几何图形,然后将每个落在给定卷绕线的右侧(对于负的‘Move’)或落在给定的‘WRAP’的左侧(对于正的‘Move’)的组件按照‘Move’参数指定的方向移动,最后将碎片重新组合在一起。

[Note]

这有助于将较长时间输入重新定为中心,以使感兴趣的特征不会从一边产生到另一边。

可用性:2.3.0需要GEOS

This function supports 3d and will not drop the z-index.

示例

-- Move all components of the given geometries whose bounding box
-- falls completely on the left of x=0 to +360
select ST_WrapX(geom, 0, 360);

-- Move all components of the given geometries whose bounding box
-- falls completely on the left of x=-30 to +360
select ST_WrapX(geom, -30, 360);
        

另请参阅

ST_ShiftLongitude