ST_SRID()

All functions > GEOSPATIAL > ST_SRID()

Returns the SRID (Spatial Reference ID) of a geometry.

Signatures

SRID

Returns: SRID integer, or 0 if none is set

ST_SRID(geo: T) → INT
sql
ParameterTypeRequiredDescription
geoTYesGeometry value

With:

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

Signature notes:

  • Returns 0 if no SRID has been assigned
  • Use ST_SETSRID to assign an SRID without reprojecting
  • GEOMETRY only; GEOGRAPHY is always WGS84 (SRID 4326) by definition
  • Not supported on BigQuery
  • Returns NULL if the input is NULL

Examples

FeatureQL
SELECT
    f1 := ST_SRID(ST_SETSRID(ST_GEOMPOINT(1.0, 2.0), 4326)), -- SRID of a geometry with SRID 4326
    f2 := ST_SRID(ST_GEOMPOINT(1.0, 2.0)) -- SRID is 0 when not set
;
Result
f1 BIGINTf2 BIGINT
43260

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