ST_nearestApproachDistance

更新时间:
复制 MD 格式

Returns the nearest approach distance between two trajectory objects over a specified time range.

Syntax

float8 ST_nearestApproachDistance(trajectory traj, trajectory traj2);
float8 ST_nearestApproachDistance(trajectory traj, trajectory traj2, tsrange range);
float8 ST_nearestApproachDistance(trajectory traj, trajectory traj2, timestamp t1, timestamp t2);

Parameters

ParameterDescription
trajThe first trajectory object.
traj2The second trajectory object.
t1The start time of the time range.
t2The end time of the time range.
rangeThe time range, specified as a tsrange value.

Examples

Select ST_nearestApproachDistance((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');