ST_nearestApproachPoint

更新时间:
复制 MD 格式

Returns the point on a trajectory that is closest to a specified geometry object, within a given time range.

Syntax

geometry ST_nearestApproachPoint(trajectory traj, tsrange range, geometry g);
geometry ST_nearestApproachPoint(trajectory traj, timestamp t1, timestamp t2, geometry g);

Parameters

ParameterTypeDescription
trajtrajectoryThe trajectory object.
rangetsrangeThe time range.
t1timestampThe start of the time range.
t2timestampThe end of the time range.
ggeometryThe geometry object to measure distance from.

Example

Select ST_nearestApproachPoint(traj, '2010-1-1 13:00:00', '2010-1-1 14:00:00', 'LINESTRING(0 0, 5 5, 9 9)'::geometry) from traj_table;