ST_subTrajectorySpatial
更新时间:
复制 MD 格式
Returns the spatial geometry object of a trajectory object within the specified time range.
Syntax
geometry ST_subTrajectorySpatial(trajectory traj, timestamp starttime, timestamp endtime);
geometry ST_subTrajectorySpatial(trajectory traj, tsrange range);Parameters
| Parameter | Type | Description |
|---|---|---|
traj | trajectory | The trajectory object. |
starttime | timestamp | The start of the time range. |
endtime | timestamp | The end of the time range. |
range | tsrange | The time range, specified as a tsrange value. |
Examples
Example 1: Clip using start and end timestamps
SELECT ST_subTrajectorySpatial(traj, '2010-1-11 02:45:30', '2010-1-11 03:00:00')
FROM traj_table;Example 2: Clip using a tsrange value
SELECT ST_subTrajectorySpatial(traj, '[2010-1-11 02:45:30, 2010-1-11 03:00:00]'::tsrange)
FROM traj_table;该文章对您有帮助吗?