Skip to content
🎉 Apache Sedona 1.8.1 is now available! Check out the new features and improvements.

ST_ShiftLongitude

Introduction: Modifies longitude coordinates in geometries, shifting values between -180..0 degrees to 180..360 degrees and vice versa. This is useful for normalizing data across the International Date Line and standardizing coordinate ranges for visualization and spheroidal calculations.

Note

This function is only applicable to geometries that use lon/lat coordinate systems.

Format: ST_ShiftLongitude (geom: geometry)

Since: v1.6.0

SQL example:

SELECT ST_ShiftLongitude(ST_GeomFromText('LINESTRING(177 10, 179 10, -179 10, -177 10)'))

Output:

LINESTRING(177 10, 179 10, 181 10, 183 10)