A Novel Context-Aware Douglas–Peucker (CADP) Trajectory Compression Method
Abstract
1. Introduction
2. Materials and Methods
2.1. Douglas–Peucker Algorithm
| Algorithm 1. The pseudo-code of the DP algorithm | |
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | ) |
| 14 | |
2.2. Context-Aware Trajectory Formulation
- Environmental Context Domain: Cenv
- Semantic Context Domain: Csem
- Internal Context Domain: Cint
2.3. Context-Aware Douglas–Peucker Algorithm
| Algorithm 2. The pseudo-code of the context-aware DP algorithm | |
| 1 | |
| 2 | |
| 3 | |
| Checking environmental context | |
| 4 | |
| 5 | |
| 6 | |
| Checking internal context | |
| 7 | |
| 8 | |
| 9 | |
| Checking Semantic context | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
2.4. Performance Evaluation
3. Results and Discussion
3.1. Datasets and Preprocesses
3.2. Effects of Context on Compression Ratio and Similarity of Trajectories
3.3. Effects of CADP on Trajectory Prediction
- Spatial + Water Depth (Compressed by CADP) yields the lowest RMSE of 0.004195, suggesting that water depth plays a significant role in accurately predicting vessel trajectories. This may be because vessels adjust their movements based on water depth, particularly in shallow or coastal regions.
- Spatial + Wave Height (Compressed by CADP) results in an RMSE of 0.005792, meaning wave height, though important, is a bit less influential in these data compared to water depth; it does still have an impact on the error reduction to provide a better prediction over a DP-compressed dataset.
- Spatial + Water Direction (Compressed by CADP) shows an RMSE of 0.004738, demonstrating that water direction influences vessel movement and prediction accuracy, and it provides a better prediction over DP-compressed and two-stage-CPLS-compressed trajectories.
3.4. Computational Efficiency Analysis
3.5. Limitations
4. Conclusions
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Zhang, D.; Ding, M.; Yang, D.; Liu, Y.; Fan, J.; Shen, H.T. Trajectory simplification: An experimental study and quality analysis. Proc. VLDB Endow. 2018, 11, 934–946. [Google Scholar] [CrossRef] [Scilit]
- Sun, S.; Chen, Y.; Piao, Z.; Zhang, J. Vessel AIS Trajectory Online Compression Based on Scan-Pick-Move Algorithm Added Sliding Window. IEEE Access 2020, 8, 109350–109359. [Google Scholar] [CrossRef] [Scilit]
- Wang, Z.; Long, C.; Cong, G.; Jensen, C.S. Collectively Simplifying Trajectories in a Database: A Query Accuracy Driven Approach. In Proceedings of the 2024 IEEE 40th International Conference on Data Engineering (ICDE), Utrecht, The Netherlands, 13–16 May 2024. [Google Scholar]
- Zhao, P.; Zhao, Q.; Zhang, C.; Su, G.; Zhang, Q.; Rao, W. CLEAN: Frequent pattern-based trajectory compression and computation on road networks. China Commun. 2020, 17, 119–136. [Google Scholar] [CrossRef] [Scilit]
- Basiri, A.; Amirian, P.; Mooney, P. Using Crowdsourced Trajectories for Automated OSM Data Entry Approach. Sensors 2016, 16, 1510. [Google Scholar] [CrossRef] [Scilit]
- Liu, J.; Li, H.; Yang, Z.; Wu, K.; Liu, Y.; Liu, R.W. Adaptive Douglas-Peucker Algorithm with Automatic Thresholding for AIS-Based Vessel Trajectory Compression. IEEE Access 2019, 7, 150677–150692. [Google Scholar] [CrossRef] [Scilit]
- Hershberger, J.E.; Snoeyink, J. Speeding Up the Douglas-Peucker Line-Simplification Algorithm; Department of Computer Science, University of British Columbia: Vancouver, BC, Canada, 1992. [Google Scholar]
- Mehri, S.; Alesheikh, A.A.; Basiri, A. A Contextual Hybrid Model for Vessel Movement Prediction. IEEE Access 2021, 9, 45600–45613. [Google Scholar] [CrossRef] [Scilit]
- de Vries, G.K.D.; van Someren, M. Machine learning for vessel trajectories using compression, alignments and domain knowledge. Expert Syst. Appl. 2012, 39, 13426–13439. [Google Scholar] [CrossRef] [Scilit]
- Makris, A.; Kontopoulos, I.; Alimisis, P.; Tserpes, K. A Comparison of Trajectory Compression Algorithms Over AIS Data. IEEE Access 2021, 9, 92516–92530. [Google Scholar] [CrossRef] [Scilit]
- Zhong, Y.; Kong, J.; Zhang, J.; Jiang, Y.; Fan, X.; Wang, Z. A trajectory data compression algorithm based on spatio-temporal characteristics. PeerJ Comput. Sci. 2022, 8, e1112. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Tienaah, T.; Stefanakis, E.; Coleman, D. Contextual Douglas-Peucker simplification. Geomatica 2015, 69, 327–338. [Google Scholar] [CrossRef] [Scilit]
- Lee, W.-C.; Krumm, J. Trajectory Preprocessing. In Computing with Spatial Trajectories; Zheng, Y., Zhou, X., Eds.; Springer: New York, NY, USA, 2011; pp. 3–33. [Google Scholar]
- Keogh, E.; Chu, S.; Hart, D.; Pazzani, M. Segmenting time series: A survey and novel approach. In Data Mining in Time Series Databases; World Scientific: Singapore, 2004; pp. 1–21. [Google Scholar]
- Cao, H.; Wolfson, O.; Trajcevski, G. Spatio-temporal data reduction with deterministic error bounds. VLDB J.—Int. J. Very Large Data Bases 2006, 15, 211–228. [Google Scholar] [CrossRef] [Scilit]
- Douglas, D.H.; Peucker, T.K. Algorithms for the reduction of the number of points required to represent a digitized line or its caricature. Cartographica 1973, 10, 112–122. [Google Scholar] [CrossRef] [Scilit]
- Meratnia, N.; de By, R.A. Spatiotemporal Compression Techniques for Moving Point Objects. In Advances in Database Technology—EDBT 2004; Springer: Berlin/Heidelberg, Germany, 2004. [Google Scholar]
- Zhang, T.; Wang, Z.; Wang, P. A method for compressing AIS trajectory based on the adaptive core threshold difference Douglas-Peucker algorithm. Sci. Rep. 2024, 14, 21408. [Google Scholar] [CrossRef] [Scilit]
- Guo, S.; Bolbot, V.; Valdez Banda, O. An adaptive trajectory compression and feature preservation method for maritime traffic analysis. Ocean. Eng. 2024, 312, 119189. [Google Scholar] [CrossRef] [Scilit]
- Zhou, Y.; Zhang, Y.; Zhang, F.; Zhang, Y.; Wang, X. Trajectory Compression with Spatio-Temporal Semantic Constraints. ISPRS Int. J. Geo-Inf. 2024, 13, 212. [Google Scholar] [CrossRef] [Scilit]
- Gao, C.; Zhao, Y.; Wu, R.; Yang, Q.; Shao, J. Semantic trajectory compression via multi-resolution synchronization-based clustering. Knowl.-Based Syst. 2019, 174, 177–193. [Google Scholar] [CrossRef] [Scilit]
- Long, C.; Wong, R.C.-W.; Jagadish, H.V. Direction-preserving trajectory simplification. Proc. VLDB Endow. 2013, 6, 949–960. [Google Scholar] [CrossRef] [Scilit]
- Li, Y.; Li, H.; Zhang, C.; Zhao, Y.; Yang, Z. Incorporation of adaptive compression into a GPU parallel computing framework for analyzing large-scale vessel trajectories. Transp. Res. Part C Emerg. Technol. 2024, 163, 104648. [Google Scholar] [CrossRef] [Scilit]
- Buchin, M.; Dodge, S.; Speckmann, B. Similarity of trajectories taking into account geographic context. J. Spat. Inf. Sci. 2014, 2014, 101–124. [Google Scholar] [CrossRef] [Scilit]
- Ahearn, S.C.; Dodge, S.; Simcharoen, A.; Xavier, G.; Smith, J.L.D. A context-sensitive correlated random walk: A new simulation model for movement. Int. J. Geogr. Inf. Sci. 2017, 31, 867–883. [Google Scholar] [CrossRef] [Scilit]
- Japan P& I Club. Marine Weather Ship Handling in Rough Sea. In P&I Loss Prevention Bulletin; Japan P& I Club: Tokyo, Japan, 2019; Volume 45. [Google Scholar]
- Dodge, S.; Bohrer, G.; Weinzierl, R.; Davidson, S.C.; Kays, R.; Douglas, D.; Cruz, S.; Han, J.; Brandes, D.; Wikelski, M. The environmental-data automated track annotation (Env-DATA) system: Linking animal tracks with environmental data. Mov. Ecol. 2013, 1, 3. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Brum-Bastos, V.S.; Long, J.A.; Demšar, U. Weather effects on human mobility: A study using multi-channel sequence analysis. Comput. Environ. Urban Syst. 2018, 71, 131–152. [Google Scholar] [CrossRef] [Scilit]
- Andrienko, G.; Andrienko, N.; Bak, P.; Keim, D.; Wrobel, S. Visual Analytics of Movement; Springer: Berlin/Heidelberg, Germany, 2013. [Google Scholar] [CrossRef] [Scilit]
- Zheng, Y. Trajectory data mining: An overview. ACM Trans. Intell. Syst. Technol. (TIST) 2015, 6, 29. [Google Scholar] [CrossRef] [Scilit]
- Spaccapietra, S.; Parent, C.; Damiani, M.L.; de Macedo, J.A.; Porto, F.; Vangenot, C. A conceptual view on trajectories. Data Knowl. Eng. 2008, 65, 126–146. [Google Scholar] [CrossRef] [Scilit]
- Yuan, J.; Zheng, Y.; Xie, X.; Sun, G. T-Drive: Enhancing Driving Directions with Taxi Drivers’ Intelligence. IEEE Trans. Knowl. Data Eng. 2013, 25, 220–232. [Google Scholar] [CrossRef] [Scilit]
- Wang, D.; Miwa, T.; Morikawa, T. Big Trajectory Data Mining: A Survey of Methods, Applications, and Services. Sensors 2020, 20, 4571. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Senin, P. Dynamic Time Warping Algorithm Review; Information and Computer Science Department, University of Hawaii at Manoa: Honolulu, HI, USA, 2008; Volume 855, p. 40. [Google Scholar]
- Vaughan, N.; Gabrys, B. Comparing and combining time series trajectories using dynamic time warping. Procedia Comput. Sci. 2016, 96, 465–474. [Google Scholar] [CrossRef] [Scilit]
- Liu, K.; Li, Y.; Dai, J.; Shang, S.; Zheng, K. Compressing large scale urban trajectory data. In Proceedings of the Fourth International Workshop on Cloud Data and Platforms; Association for Computing Machinery: New York, NY, USA; pp. 1–6.
- Zeng, Y.; Yang, J.; Yin, Y. Gaussian Process-Integrated State Space Model for Continuous Joint Angle Prediction from EMG and Interactive Force in a Human-Exoskeleton System. Appl. Sci. 2019, 9, 1711. [Google Scholar] [CrossRef] [Scilit]
- Wang, S.; Bao, Z.; Culpepper, J.S.; Sellis, T.; Qin, X. Fast large-scale trajectory clustering. Proc. VLDB Endow. 2019, 13, 29–42. [Google Scholar] [CrossRef] [Scilit]
- Agenis-Nevers, M.; Bokde, N.D.; Yaseen, Z.M.; Shende, M.K. An empirical estimation for time and memory algorithm complexities: Newly developed R package. Multimed. Tools Appl. 2021, 80, 2997–3015. [Google Scholar] [CrossRef] [Scilit]
- Niu, X.; Zheng, Y.; Fournier-Viger, P.; Wang, B. Parallel grid-based density peak clustering of big trajectory data. Appl. Intell. 2022, 52, 17042–17057. [Google Scholar] [CrossRef] [Scilit]
- Graser, A. Movingpandas: Efficient structures for movement data in python. GI_Forum—J. Geogr. Inf. Sci. 2019, 1, 54–68. [Google Scholar] [CrossRef] [Scilit]
- Mehri, S.; Alesheikh, A.A.; Basiri, A. A context-aware approach for vessels’ trajectory prediction. Ocean Eng. 2023, 282, 114916. [Google Scholar] [CrossRef] [Scilit]
- Boudière, E.; Maisondieu, C.; Ardhuin, F.; Accensi, M.; Pineau-Guillou, L.; Lepesqueur, J. A suitable metocean hindcast database for the design of Marine energy converters. Int. J. Mar. Energy 2013, 3–4, e40–e52. [Google Scholar] [CrossRef] [Scilit]
- Tavenard, R.; Faouzi, J.; Vandewiele, G.; Divo, F.; Androz, G.; Holtz, C.; Payne, M.; Yurchak, R.; Rußwurm, M.; Kolar, K. Tslearn, a machine learning toolkit for time series data. J. Mach. Learn. Res. 2020, 21, 4686–4691. [Google Scholar]
- Capobianco, S.; Millefiori, L.M.; Forti, N.; Braca, P.; Willett, P. Deep Learning Methods for Vessel Trajectory Prediction Based on Recurrent Neural Networks. IEEE Trans. Aerosp. Electron. Syst. 2021, 57, 4329–4346. [Google Scholar] [CrossRef] [Scilit]
- Tang, H.; Yin, Y.; Shen, H. A model for vessel trajectory prediction based on long short-term memory neural network. J. Mar. Eng. Technol. 2019, 21, 136–145. [Google Scholar] [CrossRef] [Scilit]
- Gao, M.; Shi, G.; Li, S. Online Prediction of Ship Behavior with Automatic Identification System Sensor Data Using Bidirectional Long Short-Term Memory Recurrent Neural Network. Sensors 2018, 18, 4211. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Alesheikh, A.A.; Mehri, S. Finding Optimal Contextual Parameters for Real-Time Vessel Position Prediction Using Deep Learning. Iran. J. Remote Sens. GIS 2022, 13, 89–100. [Google Scholar] [CrossRef] [Scilit]
- Kingma, D.P.; Ba, J. Adam: A method for stochastic optimization. arXiv 2014. [Google Scholar] [CrossRef] [Scilit]
- Kavraki, L.E.; Svestka, P.; Latombe, J.-C.; Overmars, M.H. Probabilistic roadmaps for path planning in high-dimensional configuration spaces. IEEE Trans. Robot. Autom. 1996, 12, 566–580. [Google Scholar] [CrossRef] [Scilit]
- LaValle, S.M.; Kuffner, J.J. Rapidly-exploring random trees: Progress and prospects: Steven M. Lavalle, Iowa State University, A James J. Kuffner, Jr., University of Tokyo, Tokyo, Japan. In Algorithmic and Computational Robotics; A K Peters/CRC Press: Natick, MA, USA, 2001; pp. 303–307. [Google Scholar]
- Karaman, S.; Frazzoli, E. Sampling-based algorithms for optimal motion planning. Int. J. Robot. Res. 2011, 30, 846–894. [Google Scholar] [CrossRef] [Scilit]
- Conway, B.A. Spacecraft Trajectory Optimization; Cambridge University Press: Cambridge, UK, 2010; Volume 29. [Google Scholar]
- McConaghy, T.T. Design and Optimization of Interplanetary Spacecraft Trajectories. Ph.D. Thesis, Purdue University, West Lafayette, IN, USA, 2004. [Google Scholar]
- Macdonald, M.; McInnes, C.R. Solar sail mission applications and future advancement. In Proceedings of the 2nd International Symposiun on Solar Sailing (ISSS 2010), New York, NY, USA, 20–22 July 2010. [Google Scholar]
- Du, W.; Li, Y.; Zhang, G.; Wang, C.; Zhu, B.; Qiao, J. Energy saving method for ship weather routing optimization. Ocean Eng. 2022, 258, 111771. [Google Scholar] [CrossRef] [Scilit]





| No | ϵmax (Degree) | R (%) | dtw | Change (to the Previous Step) | |
|---|---|---|---|---|---|
| R (%) | dtw (%) | ||||
| 1 | 1 | 70.47 | 236,988 | -- | --- |
| 2 | 1.5 | 72.15 | 303,402 | 1.68 | 28.02 |
| 3 | 2 | 72.84 | 524,845 | 0.69 | 72.99 |
| 4 | 2.5 | 73.25 | 524,847 | 0.41 | 0.0004 |
| Input Features | Validation RMSE |
|---|---|
| Spatial (Uncompressed) | 0.048789 |
| Spatial (Compressed by DP) | 0.012226 |
| Spatial + Context (Compressed by two-stage CPLS) | 0.004786 |
| Spatial + Water depth (Compressed by CADP) | 0.004195 |
| Spatial + wave height (Compressed by CADP) | 0.005792 |
| Spatial + Water direction (Compressed by CADP) | 0.004738 |
| Trajectory Size (n) | DP | CADP | CADP | CADP | Two-Stage CPLS | |||||
|---|---|---|---|---|---|---|---|---|---|---|
| (Spatial + Water Depth) | (Spatial + Wave Height) | (Spatial + Wave Direction) | ||||||||
| Runtime | Std | Runtime | Std | Runtime | Std | Runtime | Std | Runtime | Std | |
| 1000 | 14 | 1.0 | 16 | 1.1 | 17 | 1.3 | 17 | 1.4 | 32 | 2.3 |
| 5000 | 66 | 2.5 | 72 | 2.8 | 74 | 3.0 | 75 | 3.2 | 253 | 9.3 |
| 10,000 | 150 | 5.0 | 160 | 5.2 | 165 | 6.1 | 166 | 6.3 | 916 | 25.7 |
| 50,000 | 778 | 18.0 | 812 | 20.3 | 835 | 21.5 | 840 | 22.1 | 16,237 | 141.3 |
| 100,000 | 3190 | 85.0 | 3290 | 88.5 | 3340 | 92.2 | 3355 | 95.3 | 127,315 | 483.7 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Published by MDPI on behalf of the International Society for Photogrammetry and Remote Sensing. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Mehri, S.; Hooshangi, N.; Mahdizadeh Gharakhanlou, N. A Novel Context-Aware Douglas–Peucker (CADP) Trajectory Compression Method. ISPRS Int. J. Geo-Inf. 2025, 14, 58. https://doi.org/10.3390/ijgi14020058
Mehri S, Hooshangi N, Mahdizadeh Gharakhanlou N. A Novel Context-Aware Douglas–Peucker (CADP) Trajectory Compression Method. ISPRS International Journal of Geo-Information. 2025; 14(2):58. https://doi.org/10.3390/ijgi14020058
Chicago/Turabian StyleMehri, Saeed, Navid Hooshangi, and Navid Mahdizadeh Gharakhanlou. 2025. "A Novel Context-Aware Douglas–Peucker (CADP) Trajectory Compression Method" ISPRS International Journal of Geo-Information 14, no. 2: 58. https://doi.org/10.3390/ijgi14020058
APA StyleMehri, S., Hooshangi, N., & Mahdizadeh Gharakhanlou, N. (2025). A Novel Context-Aware Douglas–Peucker (CADP) Trajectory Compression Method. ISPRS International Journal of Geo-Information, 14(2), 58. https://doi.org/10.3390/ijgi14020058

