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
| Parameter | Type | Description |
|---|---|---|
traj | trajectory | The trajectory object. |
range | tsrange | The time range. |
t1 | timestamp | The start of the time range. |
t2 | timestamp | The end of the time range. |
g | geometry | The 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;该文章对您有帮助吗?