Returns a sub-trajectory from a trajectory object within a specified time range.
Syntax
trajectory ST_subTrajectory(trajectory traj, timestamp starttime, timestamp endtime);
trajectory ST_subTrajectory(trajectory traj, tsrange range);Parameters
| Parameter | Type | Description |
|---|---|---|
traj | trajectory | The source trajectory object. |
starttime | timestamp | The start time. |
endtime | timestamp | The end time. |
range | tsrange | The time range. |
| Return value | trajectory | The sub-trajectory covering the specified time range. |
Examples
Extract a sub-trajectory using two explicit timestamps:
SELECT ST_subTrajectory(traj, '2010-1-11 02:45:30', '2010-1-11 03:00:00') FROM traj_table;
-- Returns a trajectory object covering 02:45:30 to 03:00:00 on 2010-01-11该文章对您有帮助吗?