Skip to content

ST_SetSRID

Sets the SRID (spatial reference identifier) for a geometry.

Usage

geometry ST_SetSRID(geom: geometry, srid: integer)
geography ST_SetSRID(geog: geography, srid: integer)

Arguments

  • geog (geography): Input geography
  • srid (integer)
  • geom (geometry): Input geometry

Description

Sets the SRID (spatial reference system identifier) of the geometry. This is metadata only - no coordinate transformation occurs. Use ST_Transform to actually reproject coordinates.

See Coordinate Reference Systems for how SedonaDB represents and compares CRS.

Examples

SELECT ST_SetSRID(ST_Point(-122.35, 47.65), 4326);
┌───────────────────────────────────────────────────────────────────┐
│ st_setsrid(st_point(Float64(-122.35),Float64(47.65)),Int64(4326)) │
│                              geometry                             │
╞═══════════════════════════════════════════════════════════════════╡
│ POINT(-122.35 47.65)                                              │
└───────────────────────────────────────────────────────────────────┘