ST_timeAtDistance

更新时间:
复制 MD 格式

Returns an array of timestamps at which a trajectory reaches the specified distance from its start point.

Syntax

timestamp[] ST_timeAtDistance(trajectory traj, float8 d);

Parameters

ParameterDescription
trajThe trajectory object.
dThe distance of movement.

Return value

Returns timestamp[]. The function returns an array rather than a single value because multiple spatial points on a trajectory can be at the same distance from the start point.

Examples

Query the timestamps at which a trajectory in traj_table reaches 100 units from its start point:

SELECT ST_timeAtDistance(traj, 100) FROM traj_table;