Returns a float8 value representing the spatial deviation between a processed trajectory object and the original trajectory object. Use this function to measure the accuracy loss introduced by operations such as compression, then decide whether the result meets your precision requirements.
Syntax
float8 ST_deviation(trajectory traj, trajectory after_oper_traj);Parameters
| Parameter | Description |
|---|---|
traj | The original trajectory object. |
after_oper_traj | The processed trajectory object, such as the output of st_compress. |
Examples
Measure the deviation after compressing a trajectory
The following example compresses each trajectory in the traj_test table with a tolerance of 0.001, then returns the spatial deviation between the compressed trajectory and the original.
SELECT st_deviation(traj, st_compress(traj, 0.001)) FROM traj_test;Result:
st_deviation
---------------------
0.00919177345596219
(1 row)该文章对您有帮助吗?