Returns the spatial reference identifier (SRID) of a geometry object. The SRID must be defined in the spatial_ref_sys table.
Call ST_SRID to verify that a geometry object uses the expected coordinate system before passing it to ST_Transform. Mismatched SRIDs are a common source of incorrect transformation results.
Syntax
integer ST_SRID(geometry g1);Parameters
| Parameter | Description |
|---|---|
g1 | The geometry object whose SRID to return. |
Usage notes
Supports circular strings and curves.
Examples
Get the SRID of a geometry object:
SELECT ST_SRID('SRID=4326;POINT(0 0)'::geometry);
st_srid
---------
4326
(1 row)What's next
ST_SetSRID — assign an SRID to a geometry object
ST_Transform — reproject a geometry object from one spatial reference system to another
该文章对您有帮助吗?