ST_SRID

Set or get the spatial reference system identifier (SRID) of a geometry.

Syntax

ST_SRID(geo[, srid]);
geo
The input geometry.

Type: VARCHAR(ANY)

srid
The spatial reference system identifier.

Type: INT4

Default: 4326

Returns

When used to set an SRID, a value of type VARCHAR(200) 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))'));
 
ST_SRID
---------
4326
(1 row)

SELECT inza..ST_SRID(inza..ST_SRID(inza..ST_WKTToSQL('POLYGON((10 10, 10 20, 20 20, 20 15, 10
            10))'), 1234));
 
ST_SRID
---------
1234
(1 row)