This topic describes the ST_SRID function, which obtains the spatial reference identifier (SRID) of a trajectory. When you perform space-related operations, ApsaraDB RDS uses SRIDs to search for information about the used spatial references. This allows ApsaraDB RDS to accurately perform calculations.

Syntax

int ST_SRID(trajectory traj);

Parameters

Parameter Description
traj The trajectory whose SRID you want to obtain.

Description

  • The geographic coordinate system and projection information of each SRID are saved in a system table named spatial_ref_sys.
  • The default value of an SRID is 0.

Example

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);
 st_srid 
---------
       0
(1 row)