ST_SETSRID()

All functions > GEOSPATIAL > ST_SETSRID()

Sets the SRID on a geometry without modifying or reprojecting coordinates.

Signatures

Set SRID

Returns: The same geometry with the new SRID tag; coordinates are unchanged

ST_SETSRID(geo: T, srid: INT) → GEOM_MULTIANY
sql
ParameterTypeRequiredDescription
geoTYesGeometry value
sridINTYesEPSG SRID to assign

With:

  • T : Custom types: GEOM_POINT | GEOM_LINESTRING | GEOM_POLYGON | GEOM_MULTIPOINT | GEOM_MULTILINESTRING | GEOM_MULTIPOLYGON | GEOM_MULTIANY

Signature notes:

  • Does NOT reproject coordinates; only tags the geometry with the given SRID
  • Required before calling ST_TRANSFORM if the source geometry has no SRID (ST_SRID = 0)
  • GEOMETRY only; GEOGRAPHY is always WGS84
  • Not supported on BigQuery
  • Returns NULL if the input is NULL

Examples

FeatureQL
SELECT
    f1 := ST_SRID(ST_SETSRID(ST_GEOMPOINT(-122.4194, 37.7749), 4326)) -- Tag a geometry as WGS84
;
Result
f1 BIGINT
4326

Last update at: 2026/05/26 17:22:09