This topic describes the ST_SetSRID function. This function sets a spatial reference identifier (SRID) for a geometry object.
Syntax
geometry ST_SetSRID(geometry geom , integer srid);Parameters
| Parameter | Description |
|---|---|
| geom | The geometry object that you want to specify. |
| srid | The SRID of the geometry object. |
Description
- The ST_SetSRID function does not transform the coordinates of the geometry object
that you specify. This function sets the metadata that defines the spatial reference
system in which the geometry object resides.
Note If you want to transform the geometry object into a new projection, use the ST_Transform function.
- The ST_SetSRID function supports circular strings and curves.
Examples
SELECT ST_AsEWKT(ST_SetSRID(ST_GeomFromText('LINESTRING(2 1,1 1)'),4326));
st_asewkt
-------------------------------
SRID=4326;LINESTRING(2 1,1 1)
(1 row)