ST_mdistance
更新时间:
复制 MD 格式
Returns the Euclidean distance between two trajectory objects at each shared time point, as an array of float values.
Syntax
float[] ST_mdistance(trajectory traj1, trajectory traj2);Parameters
| Parameter | Description |
|---|---|
traj1 | The first trajectory object. |
traj2 | The second trajectory object. |
Return value
Returns a float[] array where each element is the Euclidean distance between the two trajectories at one shared time point.
The distances are not normalized. Each array element is a raw Euclidean distance at a single time point.
Example
The following example computes the per-time-point distances between two trajectories stored in traj_table.
SELECT ST_mDistance(
(SELECT traj FROM traj_table WHERE id = 1),
(SELECT traj FROM traj_table WHERE id = 2)
);该文章对您有帮助吗?