ST_SRID
Set or get the spatial reference system identifier (SRID) of a geometry.
Syntax
ST_SRID(geo[, srid]);
- geo
- The input geometry.
Type: ST_GEOMETRY(ANY)
- srid
- The spatial reference system identifier.
Type: INT4
Default: 4326
Returns
When used to set an SRID, a value of type ST_GEOMETRY(ANY) that contains the input geometry with the new SRID set. When used to get an SRID, a value of type INT4 that contains the SRID.
Examples
SELECT inza..ST_SRID(inza..ST_Point(1.0, 5.0, 4326));
ST_SRID
---------
4326
(1 row)
SELECT inza..ST_SRID(inza..ST_WKTToSQL('POLYGON((10 10, 10 20, 20 20, 20 15, 10 10))', 4269));
ST_SRID
---------
4269
(1 row)
SELECT
inza..ST_SRID(inza..ST_SRID(inza..ST_WKTToSQL('POLYGON((10 10, 10 20, 20 20, 20 15, 10 10))'), 27700));
ST_SRID
---------
27700
(1 row)