Reputation: 1921
Douglas-Peucker algorithm is a line generalization algorithm, that recursively selects points from the original set of GPS trajectory points.
But this algorithm is not suitable for GPS trajectory data since both spatial and temporal data should be taken into account, while DP only takes into acount the spatial predicates.
There are several DP implementations like:
1) https://pypi.org/project/rdp/
2) https://rdp.readthedocs.io/en/latest/
In order to take into acount the temporal extent, there is another algorithm called Modified Douglas-Peucker (TD-TR). The TD-TR approach uses the DP algorithm and, moreover, takes time into account. In particular, it replaces the Euclidean distance used in DP by a time-aware one, called Synchronous Euclidean Distance (SED).
I wonder if there some implementation of this algorithm.
Upvotes: 0
Views: 727
Reputation:
If the goal is to obtain straight sections with a constant speed, doesn't that reduce to finding straight sections in the 4D representation (x, y, z, t), using standard DP ?
Upvotes: 0
Reputation: 11322
The original paper (Spatiotemporal Compression Techniques for Moving Point Objects by Nirvana Meratnia and Rolf A. de By) contains pseudo code for the enhanced algorithm which imposes a limit on distance error as well as speed error for trajectory compression. This is relevant because the reduction of track points might cause errors in the observed speed.
A Python implementation can be found here.
Upvotes: 0