Returns the timeline of a trajectory object.
Syntax
text ST_trajectoryTemporal(trajectory traj);
text ST_trajTemporal(trajectory traj);Parameters
| Parameter | Description |
|---|---|
traj | The 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.
该文章对您有帮助吗?