ST_TRANSFORM()
All functions > GEOSPATIAL > ST_TRANSFORM()
Reprojects a geometry from its current SRID to a target SRID.
Signatures
Transform
Returns: Reprojected geometry in the target CRS; sub kind preserved
ST_TRANSFORM(geo: T, target_srid: INT) → GEOM_MULTIANY sql
| Parameter | Type | Required | Description |
|---|---|---|---|
geo | T | Yes | Geometry value with a valid SRID set |
target_srid | INT | Yes | Target EPSG SRID to reproject into |
With:
T: Custom types: GEOM_POINT | GEOM_LINESTRING | GEOM_POLYGON | GEOM_MULTIPOINT | GEOM_MULTILINESTRING | GEOM_MULTIPOLYGON | GEOM_MULTIANY
Signature notes:
- The source SRID is read from the geometry itself (set via ST_SETSRID or from source data)
- If the source SRID is 0 or unknown, this raises an error; use ST_SETSRID to fix the geometry first
- Only changes coordinates; does not change the sub kind
- GEOMETRY only; GEOGRAPHY is always WGS84 and cannot be reprojected
- Only supported on DuckDB (requires PROJ); not supported on BigQuery or Trino
- Returns NULL if any input is NULL
Examples
FeatureQL
SELECT
f1 := ST_ASTEXT(ST_TRANSFORM(ST_SETSRID(ST_GEOMPOINT(-122.4194, 37.7749), 4326), 32610)) -- Reproject San Francisco from WGS84 (EPSG:4326) to UTM zone 10N (EPSG:32610); exact meters depend on PROJ/DuckDB
;Result
| f1 VARCHAR |
|---|
| POINT (551130.7684812841 4180998.8814990623) |
On this page