Returns true if the distance between two trajectory objects within the specified time range is within the reference distance.
Syntax
boolean ST_distanceWithin(trajectory traj1, trajectory traj2, tsrange range, float8 d);
boolean ST_distanceWithin(trajectory traj1, trajectory traj2, timestamp t1, timestamp t2, float8 d);Parameters
| Parameter | Description |
|---|---|
traj1 | The first trajectory object. |
traj2 | The second trajectory object. |
range | The time range, specified as a tsrange value. |
t1 | The start time of the time range. |
t2 | The end time of the time range. |
d | The reference distance. The function returns true if the distance between traj1 and traj2 is within this value during the specified time range. |
Examples
Select ST_distanceWithin((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', 100);该文章对您有帮助吗?