ST_equals
更新时间:
复制 MD 格式
Returns true if two trajectory objects are spatially equal within a specified time range.
Syntax
boolean ST_equals(trajectory traj1, trajectory traj2, tsrange range);
boolean ST_equals(trajectory traj1, trajectory traj2, timestamp t1, timestamp t2);Use the tsrange overload to pass a single range value, or the t1, t2 overload to pass the start and end timestamps separately.
Parameters
| Parameter | Description |
|---|---|
traj1, traj2 | The trajectory objects to compare. |
range | The time range as a tsrange value. |
t1 | The start timestamp of the time range. |
t2 | The end timestamp of the time range. |
Example
The following example checks whether the trajectories with id=1 and id=2 in traj_table are spatially equal between 13:00 and 14:00 on January 1, 2010.
SELECT ST_equals(
(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'
);该文章对您有帮助吗?