This topic describes the ST_ShiftLongitude function. This function converts the y coordinates of the input geometry object from -180 to 0 degrees to 180 to 360 degrees, or from 180 to 360 degrees to -180 to 0 degrees.

Syntax

geometry  ST_ShiftLongitude(geometry  geomA);

Parameters

Parameter Description
geomA The geometry object that you want to specify.

Description

  • This function processes only objects represented by latitude and longitude coordinate systems, such as the World Geodetic System 1984 (WGS 84) coordinate system.
  • This function supports 3D objects and does not delete z coordinates.
  • This function supports polyhedral surfaces, triangles, and triangulated irregular network (TIN) surfaces.

Examples

SELECT ST_AsText(ST_ShiftLongitude('POINT(181 30)'));
   st_astext
----------------
 POINT(-179 30)
(1 row)