Returns the standardized Euclidean distance between two trajectory objects at the same time point.
Syntax
float ST_euclideanDistance(trajectory traj1, trajectory traj2);Parameters
| Parameter | Type | Description |
|---|---|---|
traj1 | trajectory | The first trajectory object. |
traj2 | trajectory | The second trajectory object. |
Usage notes
The function computes the Euclidean distance between traj1 and traj2 at the same time point. The returned value is standardized (normalized), not a raw spatial distance.
Examples
The following example computes the standardized Euclidean distance between two trajectories stored in traj_table. The function returns a float value.
SELECT ST_euclideanDistance(
(SELECT traj FROM traj_table WHERE id = 1),
(SELECT traj FROM traj_table WHERE id = 2)
);该文章对您有帮助吗?