Returns the spatial reference identifier (SRID) of a trajectory. Use this function to verify which coordinate system a trajectory uses before performing spatial operations or joining it with other spatial datasets.
Syntax
int ST_SRID(trajectory traj);Parameters
| Parameter | Description |
|---|---|
traj | The trajectory to query. |
Usage notes
The geographic coordinate system and projection information for each SRID are stored in the
spatial_ref_syssystem table. PolarDB for PostgreSQL uses this table to look up spatial reference details when performing coordinate-based calculations.The default SRID is
0.
Example
This example queries the SRID of a trajectory that has no assigned coordinate system. The function returns 0, the default value.
SELECT ST_SRID(
'{"trajectory":{"version":1,"type":"STPOINT","leafcount":2,"start_time":"2007-05-27 00:00:00","end_time":"2007-05-28 08:36:47.846","spatial":"LINESTRING(13.43593 52.41721,13.43593 52.41721)","timeline":["2007-05-27 00:00:00","2007-05-28 08:36:47.846"]}}'::trajectory
);Result:
st_srid
---------
0
(1 row)该文章对您有帮助吗?