Skip to content
🌵SedonaDB (Rust) 0.3.0 is out now, featuring larger-than-memory spatial joins, and row-level CRS!

ST_Transform

Introduction:

Transform the Spatial Reference System / Coordinate Reference System of A, from SourceCRS to TargetCRS.

Since v1.9.0, Sedona supports multiple CRS formats including EPSG codes, WKT1, WKT2, PROJ strings, and PROJJSON. Grid files for high-accuracy datum transformations are also supported.

Tip

For comprehensive details on supported CRS formats, grid file usage, and examples, see the Spark SQL CRS Transformation documentation.

Note

By default, this function uses lat/lon order. You can use ST_FlipCoordinates to swap X and Y.

Format: ST_Transform (A:geometry, SourceCRS:string, TargetCRS:string)

Return type: Geometry

SQL example:

SELECT ST_Transform(polygondf.countyshape, 'epsg:4326','epsg:3857')
FROM polygondf

ST_Transform