ST_intersects
更新时间:
复制 MD 格式
Returns true if two trajectory objects intersect in space within the specified time range.
Syntax
boolean ST_intersects(trajectory traj1, trajectory traj2);
boolean ST_intersects(trajectory traj1, trajectory traj2, tsrange range);
boolean ST_intersects(trajectory traj1, trajectory traj2, timestamp t1, timestamp t2);Parameters
| Parameter | Description |
|---|---|
traj | The trajectory object. |
range | The time range, specified as a tsrange value. |
t1 | The start time. |
t2 | The end time. |
Return value
boolean — returns true if the two trajectories intersect in space within the specified time range; otherwise returns false.
Examples
The following example checks whether the trajectory with id=1 and the trajectory with id=2 intersect in space between 13:00 and 14:00 on January 1, 2010.
Select ST_intersects((Select traj from traj_table where id=1), (Select traj from traj_table where id=2), '2010-1-1 13:00:00', '2010-1-1 14:00:00');该文章对您有帮助吗?