ST_timeAtDistance

更新时间: 2026-03-28 03:58:20

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;
上一篇: ST_timeToDistance 下一篇: ST_cumulativeDistanceAtTime
阿里云首页 云原生数据库 PolarDB 相关技术圈