指定時間區間的軌跡段1離給定軌跡段2是否在指定距離之內。
文法
boolean ST_distanceWithin(trajectory traj1, trajectory traj2, tsrange range, float8 d);
boolean ST_distanceWithin(trajectory traj1, trajectory traj2, timestamp t1, timestamp t2, float8 d);
參數
| 參數名稱 | 描述 |
| traj | 軌跡對象。 |
| t1 | 開始時間。 |
| t2 | 結束時間。 |
| range | 時間段。 |
| d | 指定距離。 |
樣本
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);