全部產品
Search
文件中心

AnalyticDB:ST_durationWithin

更新時間:Feb 05, 2024

指定時間區間的軌跡段1和軌跡段2經過某點(空間相交點)的時間相差是否在指定時間區間內。

文法

boolean ST_durationWithin(trajectory traj1, trajectory traj2, tsrange range, interval i );
boolean ST_durationWithin(trajectory traj1, trajectory traj2, timestamp t1, timestamp t2, interval i);

參數

參數名稱 描述
traj 軌跡對象。
t1 開始時間。
t2 結束時間。
range 時間段。
i 時間間隔。

描述

如果軌跡多次經過相同的點,任意一個時間符合要求就認為符合要求。

樣本

Select ST_durationWithin((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', INTERVAL '30s');