Returns the spatial reference identifier (SRID) of a spatial object.
SRID identifies the coordinate reference system assigned to a geometry. Verifying the SRID before running spatial operations — such as coordinate transformation — prevents mismatched coordinate system errors.
Syntax
int4 ST_Srid(meshgeom geom);
int4 ST_Srid(sfmesh sfmeshObject);Parameters
| Parameter | Type | Description |
|---|---|---|
geom | meshgeom | The meshgeom object to query. |
sfmeshObject | sfmesh | The sfmesh object to query. |
Return value
Returns an int4 value representing the SRID of the input object.
Example
The following example retrieves the SRID of a meshgeom object created with SRID 4490:
SELECT ST_Srid(
ST_MeshGeomFromText(
'Srid=4490;MESHGEOM(PATCH(INDEXSURFACE(VERTEX(0 0 2,0 10 3,10 10 1,10 0 1),INDEX((0,1,2),(1,2,3)))))'
)
);Result:
---------
4490What's next
To create a
meshgeomobject from WKT input, useST_MeshGeomFromText.
该文章对您有帮助吗?