Sets a spatial reference identifier (SRID) for an object.
Syntax
meshgeom ST_Srid(meshgeom geom, int4 srid);
sfmesh ST_Srid(sfmesh sfmeshObject, int4 srid);Parameters
| Parameter | Type | Description |
|---|---|---|
geom | meshgeom | The meshgeom object to assign the SRID to. |
sfmeshObject | sfmesh | The sfmesh object to assign the SRID to. |
srid | int4 | The SRID to set on the returned object. |
Example
The following example creates a meshgeom object with SRID 4490, reassigns SRID 4326 using ST_SetSrid, and then reads back the SRID with ST_Srid to confirm the update.
SELECT ST_Srid(
ST_SetSrid(
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)))))'),
4326
)
);Output:
---------
4326See also
ST_Srid— Read the current SRID of a spatial object.ST_MeshGeomFromText— Construct a meshgeom object from WKT.
该文章对您有帮助吗?