ST_SRID

更新时间:
复制 MD 格式

Returns the spatial reference identifier (SRID) of a geometry object.

Syntax

integer ST_SRID(geometry g1);

Parameters

ParameterDescription
g1The geometry object.

Usage notes

  • The SRID must be defined in the spatial_ref_sys table.

  • ST_SRID supports circular strings and curves.

Example

The following example returns the SRID of a geometry object with WGS 84 coordinates (SRID 4326, the standard longitude and latitude coordinate system):

SELECT ST_SRID('SRID=4326;POINT(0 0)'::geometry);
 st_srid
---------
    4326
(1 row)