ST_trajectoryTemporal

更新时间:
复制 MD 格式

Returns the timeline of a trajectory object.

Syntax

text ST_trajectoryTemporal(trajectory traj);
text ST_trajTemporal(trajectory traj);

Parameters

ParameterDescription
trajThe trajectory object.

Examples

SELECT ST_trajectoryTemporal(
  ST_MakeTrajectory(
    'STPOINT'::leaftype,
    ST_GeomFromText('LINESTRING (114 35, 115 36, 116 37)', 4326),
    '[2010-01-01 14:30, 2010-01-01 15:30)'::tsrange,
    null
  )
);

Output:

                          st_trajectorytemporal
--------------------------------------------------------------------------------
 {"timeline":["2010-01-01 14:30:00","2010-01-01 15:00:00","2010-01-01 15:30:00"]}
(1 row)

The input LINESTRING has three points, so the output timeline array contains three timestamps.