ST_timeAtDistance
Updated at:
Copy as MD
Returns an array of timestamps representing the moments when a moving object reaches a given distance from its trajectory's start point.
Multiple spatial points may be at the same distance from the start point, so the function returns an array rather than a single value.
Syntax
timestamp[] ST_timeAtDistance(trajectory traj, float8 d);Parameters
| Parameter | Description |
|---|---|
traj | The trajectory object. |
d | The distance of movement. |
Example
The following query returns the timestamps at which each tracked object in traj_table reaches the 100-unit distance mark from its start point.
SELECT ST_timeAtDistance(traj, 100) FROM traj_table;The function returns a timestamp[].
Is this page helpful?