Name

ST_Shift_Longitude — Converts geometry longitude values from range [-180,180] to the range [0-360]

Synopsis

geometry ST_Shift_Longitude(bytea Geometry);

Alias

Shift_Longitude

Description

Converts geometry longitude values from range [-180,180] to the range [0-360]

[Note]

This method supports GeometryCollections

Coordinate Dimensions
2D3DM
Spatial Standards Support
OGC SFS for SQL. 1.1 (1999)OGC SFS for SQL. 1.1.0 (2005)OGC SFS for SQL. 1.2.0 (2006)SQL-MM Part 3
----

Examples

--2D LineString
SELECT ST_AsEWKT(ST_Shift_Longitude(ST_GeomFromText('LINESTRING(-3.52 41.0,2.33 48.86)',4326)));
--Result
SRID=4326;LINESTRING (356.48 41, 2.33 48.86)

--3D MultiPoint
SELECT ST_AsEWKT(Shift_Longitude(ST_GeomFromEWKT('SRID=4326;MULTIPOINT(-3.52 41.0 5,2.33 48.86  285)')));
--Result
SRID=4326;MULTIPOINT ((356.48 41 5), (2.33 48.86 285))

Related functions