ST_subTrajectory
Updated at:
Returns the sub-trajectory of a trajectory object within the 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 trajectory object. |
starttime | timestamp | The start time of the sub-trajectory. |
endtime | timestamp | The end time of the sub-trajectory. |
range | tsrange | The time range of the sub-trajectory. |
Return value: A trajectory object representing the portion of traj within the specified time range.
Examples
Extract the portion of a trajectory between two timestamps:
Select ST_subTrajectory(traj, '2010-1-11 02:45:30', '2010-1-11 03:00:00') FROM traj_table;Is this page helpful?