A Fourier Fitting Method for Floating Vehicle Trajectory Lines
Abstract
1. Introduction
1.1. Advances in Trajectory Data Research
1.2. Innovation Points of This Paper
2. Fourier Series Model of Trajectory Data
2.1. Time Function of Trajectory Data
2.2. Fourier Transform of Trajectory Data
2.2.1. Fourier Series Construction
2.2.2. Periodic Extension and Gibbs Phenomenon Avoidance
2.2.3. Application Process of Fourier Model
3. Fitting Method of Trajectory Data
3.1. Feature Point Supplement of Trajectory Data Based on Road Network
Algorithm 1: Add key feature points |
Input: Traj (raw trajectory data), G (road network). Output: RetrunTraj (trajectory data after inserting nodes). |
/* Stage 1: calculate the road network arc segment where the trajectory point is located */ 1. for each p[i] in Traj do 2. E[i]←Calculate the arc segment of the road network where p[i] is located 3. endfor /* Stage 2: insert arc turning points into the trajectory */ 4. while i < length [Traj]-1 do 5. Edge1←E[i] 6. Edge2←E[i+1] 7. if Edge1<>Edge2 then 8. LinkPt←Calculate the connection point between Edge1 and Edge2 9. Calculate the shortest path from p[i] to p[i+1] using the shortest path algorithm, and determine whether LinkPt is a key point such as an intersection or a T-junction by searching for the road network through which the path passes. 10. if LinkPt is the key point then 11. t,v←Calculate the corresponding time and velocity of LinkPt in the trajectory 12. RetrunTraj←insert LinkPt into Traj 13. endif 14. endif 15. endwhile 16. return RetrunTraj |
3.2. Calculation of Fitting Accuracy for Trajectory Data
3.3. Calculation of Fourier Expansion Terms of Trajectory Data
3.3.1. Fourier Convergence Analysis of Trajectory Data
3.3.2. Functional Relationship Between Duration and Points of Trajectory and Number of Fourier Expansion Terms
4. Test and Analysis
4.1. Sample Data and Test Methods
- Supplementary feature points: Monitor the trajectory line according to the process of adding the key feature points shown in Figure 4, calculate the time and speed according to Formula (6) at the place where they need to be added, and generate new nodes and insert them into the trajectory line, so as to obtain the modified trajectory line containing the newly inserted nodes.
- Obtain the number of terms K in the Fourier expansion: Substitute the duration and points of the original discrete trajectory data into Formula (10) as input parameters to obtain the number of Fourier expansion terms K suitable for the duration and number of points.
- Obtain the amplitude array of harmonic components: Taking time as the independent variable, expand the original trajectory data within a given time span to K terms based on Formula (5) to obtain an amplitude array of harmonic components containing position and velocity information.
- Fitted trajectory points: Select an arbitrary time point (this time point must be within the time duration of the original trajectory), and together with the amplitude array, substitute this into Formula (4) for inverse Fourier transform to obtain the fitted position and velocity at the selected time point.
4.2. Result Analysis
5. Comparison Between Fourier Fitting and Bézier Fitting of Trajectory Data
6. Discussion and Summary
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Zhu, Q.; Fu, X. The Review of Visual Analysis Methods of Multi-modal Spatio-temporal Big Data. Acta Geod. Cartogr. Sin. 2017, 46, 1672–1677. [Google Scholar]
- Draper, N.; Smith, H. Applied Regression Analysis, 3rd ed.; John Wiley & Sons: New York, NY, USA, 1998; pp. 15–96. [Google Scholar]
- Powell, M. Approximation Theory and Methods; Cambridge University Press: New York, NY, USA, 1981; pp. 33–41. [Google Scholar]
- De Boor, C. A Practical Guide to Splines; Springer: New York, NY, USA, 1978; pp. 2–15. [Google Scholar]
- Loader, C. Local Regression and Likelihood; Springer: New York, NY, USA, 1999; pp. 15–76. [Google Scholar]
- Smola, A.J.; Schölkopf, B. A tutorial on support vector regression. Stat. Comput. 2004, 14, 199–222. [Google Scholar] [CrossRef]
- Journel, A.; Huijbregts, C. Mining Geostatistics; Academic Press: London, UK, 1978; pp. 25–130. [Google Scholar]
- Anselin, L. Local indicators of spatial association—LISA. Geogr. Anal. 1995, 27, 93–115. [Google Scholar] [CrossRef]
- Jolliffe, I.T. Principal component analysis: A beginner’s guide—I. Introduction and application. Weather 1990, 45, 375–382. [Google Scholar] [CrossRef]
- Anselin, L. Spatial Econometrics: Methods and Models; Springer Science & Business Media Dordrecht: Berlin, Germany, 1988; pp. 16–115. [Google Scholar]
- Wu, H.H. Study of Mathematical Model for Fitting S shape Distributed Data. Geomat. Inf. Sci. Wuhan Univ. 2009, 4, 474–478. [Google Scholar]
- Douglas, D.H.; Peucker, T.K. Algorithms for the reduction of the number of points required to represent a digitized line or its caricature. Cartogr. Int. J. Geogr. Inf. Geovisualization 1973, 10, 112–122. [Google Scholar] [CrossRef]
- Li, Z.L.; Openshaw, S. Algorithms for automated line generalization based on a natural principle of objective generalization. Int. J. Geogr. Inf. Syst. 1992, 6, 373–389. [Google Scholar] [CrossRef]
- Bi, J.; Zhu, Y.; Cheng, Y. A Comprehensive Map Matching Algorithm Based on Curve Fitting and Network Topology. J. Transp. Inf. Saf. 2014, 32, 127–131. [Google Scholar]
- Yang, M.; Chen, Y.Y.; Jin, C.; Cheng, Q. A Method of Speed-preserving Trajectory Simplification. Acta Geod. Cartogr. Sin. 2017, 46, 2016–2023. [Google Scholar]
- Wu, J.G.; Liu, M.; Wei, G.; Liu, L.F. An Improved Trajectory Data Compression Algorithm of Sliding Window. Comput. Technol. Dev. 2015, 25, 47–51. [Google Scholar]
- Ai, T.H.; Shuai, Y.; Li, J.Z. A Spatial Query Based on Shape Similarity Cognition. Acta Geod. Cartogr. Sin. 2009, 38, 356–362. [Google Scholar]
- Shuai, Y.; Ai, T.H.; Shuai, H.Y.; Ni, L. Polygonal Inquiry Based on Shape Template Matching. Geomat. Inf. Sci. Wuhan Univ. 2008, 33, 1267–1270. [Google Scholar]
- Liu, P.C.; Ai, T.H. Applications of Shape Recognition in Map Generalization. Acta Geod. Cartogr. Sin. 2012, 41, 316. [Google Scholar]
- Liu, P.C.; Ai, T.H.; Bi, X. Multi-scale Representation Model for Contour Based on Fourier Series. Geomat. Inf. Sci. Wuhan Univ. 2013, 38, 221–224. [Google Scholar]
- Liu, P.C.; Xiao, T.Y.; Xiao, J.; Ai, T.H. A multi-scale representation Model of Polyline Based on Head/Tail Breaks. Int. J. Geogr. Inf. Sci. 2020, 34, 2275–2295. [Google Scholar] [CrossRef]
- Xiang, L.G.; Gong, J.Y.; Wu, T.; Li, W.H. Spatio-Temporal Trajectory Relationships Based on Stop/Move Abstraction. Geomat. Inf. Sci. Wuhan Univ. 2014, 39, 956–962. [Google Scholar]
- Li, J.C.; Zhao, D.B. An Investigation on Image Compression Using the Trigonometric Bézier Curve with a Shape Parame ter. Math. Probl. Eng. 2013. [Google Scholar] [CrossRef]
- Sarfraz, M.; Asim, M.R.; Masood, A. Capturing outlines using cubic Bezier curves. In Proceedings of the 2004 International Conference on Information and Communication Technologies, Bangkok, Thailand, 3–5 November 2004; IEEE: Damascus, Syria, 2004; pp. 539–540. [Google Scholar]
- Liu, P.C.; Ma, H.R.; Zou, Y.; Shao, Z.Q. Autoencoder neural network method for curve data compression. Acta Geod. Cartogr. Sin. 2024, 53, 1634–1643. [Google Scholar]
- Heckbert, P. Fourier transforms and the fast Fourier transform (FFT) algorithm. Comput. Graph. 1995, 2, 15–463. [Google Scholar]
- Khan, K. Generalized Bézier Curves and Their Applications in Computer Aided Geometric Design. Ph.D. Dissertation, Jawaharlal Nehru University New Delhi, New Delhi, India, 15 July 2018. [Google Scholar]
Trajectory ID | Duration (min) | Points | Graphical | Fourier Series Expansion Terms | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|
200 | 400 | 800 | 1200 | 1600 | 2000 | 2400 | 3000 | ||||
Synchronous Euclidean Distance (m) | |||||||||||
1 | 120 | 138 | 21.5 | 11.1 | 5.6 | 3.5 | 2.6 | 2.1 | 1.7 | 1.4 | |
2 | 120 | 127 | 21.7 | 12.4 | 6.9 | 4.4 | 3.5 | 2.8 | 2.3 | 1.9 | |
3 | 120 | 152 | 22.3 | 10.9 | 5.1 | 3.3 | 2.5 | 2.0 | 1.6 | 1.3 | |
4 | 120 | 183 | 20.6 | 10.0 | 4.8 | 3.1 | 2.4 | 1.6 | 1.55 | 1.24 | |
5 | 180 | 211 | 19.4 | 15.4 | 9.6 | 6.4 | 4.8 | 3.8 | 2.7 | 2.2 | |
6 | 180 | 257 | 21.0 | 16.1 | 9.3 | 7.4 | 5.3 | 4.3 | 3.4 | 2.7 | |
7 | 180 | 227 | 20.0 | 15.9 | 7.7 | 4.9 | 4.0 | 2.9 | 2.4 | 1.9 |
Partitioning Scheme 1 | Duration (min) | Number of Trajectories | Partitioning Scheme 2 | Number of Points | Number of Trajectories |
---|---|---|---|---|---|
Time Interval Classification | 10–50 | 9 | Points Classification | 13–70 | 11 |
50–120 | 11 | 70–140 | 11 | ||
120–190 | 12 | 140–210 | 10 | ||
190–260 | 9 | 210–280 | 9 | ||
260–326 | 9 | 280–340 | 9 |
Trajectory ID | Duration (min) | Points | Original K Value | Fitting K Value | Deviation of K Value |
---|---|---|---|---|---|
1 | 10 | 13 | 200 | 221 | +21 |
2 | 34 | 46 | 200 | 218 | +18 |
3 | 57 | 72 | 400 | 419 | +19 |
4 | 69 | 96 | 800 | 816 | +16 |
5 | 83 | 111 | 800 | 821 | +21 |
6 | 110 | 145 | 800 | 811 | +11 |
7 | 135 | 150 | 1200 | 1185 | −15 |
8 | 147 | 190 | 800 | 818 | +18 |
9 | 152 | 178 | 800 | 779 | −21 |
10 | 179 | 240 | 1200 | 1182 | −18 |
11 | 218 | 260 | 1600 | 1619 | +19 |
12 | 227 | 210 | 1200 | 1188 | −12 |
13 | 272 | 320 | 2000 | 2000 | 0 |
14 | 286 | 280 | 1600 | 1611 | +11 |
15 | 308 | 310 | 1600 | 1574 | −26 |
16 | 326 | 340 | 1600 | 1615 | +15 |
i | 0 | 1 | 2 | 3 | |
---|---|---|---|---|---|
j | |||||
0 | 645.8 | −96.7 | 7.4 | −0.5 | |
1 | 32.1 | −8.5 | 1.2 | ||
2 | 3.3 | −0.9 | |||
3 | 0.2 |
Trajectory ID | Duration (min) | Points | Fitted K | Synchronous Euclidean Distance (m) | Average Speed Error (km/h) |
---|---|---|---|---|---|
1 | 40 | 51 | 400 | 2.5 | 0.2 |
2 | 69 | 96 | 966 | 2.3 | 0.2 |
3 | 105 | 126 | 969 | 2.8 | 0.5 |
4 | 112 | 116 | 1311 | 3.3 | 0.3 |
5 | 179 | 240 | 1182 | 3.7 | 0.6 |
6 | 183 | 190 | 1903 | 3.8 | 0.4 |
7 | 225 | 300 | 1211 | 4.4 | 0.6 |
8 | 272 | 320 | 2000 | 4.2 | 0.6 |
9 | 308 | 310 | 1600 | 4.6 | 0.7 |
10 | 326 | 333 | 2011 | 4.5 | 0.8 |
Trajectory ID | Fitting Algorithm | Number of Parameters Involved in Fitting | |||||
---|---|---|---|---|---|---|---|
400 | 600 | 800 | 1000 | 1200 | 1400 | ||
Synchronous Euclidean Distance (m) | |||||||
a | Fourier | 58.1 | 24.4 | 19.1 | 5.6 | 2.7 | 1.8 |
Bézier | 46.1 | 47.4 | 78.1 | 102.9 | 120.9 | 140.8 | |
b | Fourier | 82.6 | 42.0 | 32.5 | 9.7 | 4.6 | 3.1 |
Bézier | 72.5 | 72.5 | 88.1 | 130.3 | 134.2 | 138.1 | |
c | Fourier | 106.2 | 50.6 | 39.6 | 11.5 | 5.4 | 3.4 |
Bézier | 48.8 | 49.1 | 84.5 | 113.6 | 130.6 | 143.5 | |
d | Fourier | 103.9 | 47.5 | 40.7 | 12.0 | 5.8 | 3.6 |
Bézier | 52.4 | 54.7 | 87.0 | 120.6 | 123.2 | 129.2 |
Features | Fourier Method | Bézier Method |
---|---|---|
Modeling Object | Location and speed information | Only location information |
Description Method | Frequency domain representation and periodic function | Control points and basis functions |
Speed Modeling Capability | Capable of modeling speed changes | Cannot directly model speed |
Location Modeling Capability | Suitable for describing periodic changes in location information, capable of capturing frequency components | More suitable for describing local position changes and boundary conditions |
Application Scenarios | Signal processing, audio synthesis | Graphic interpolation, animation path |
Computing Efficiency | Can efficiently process large-scale data | Computational complexity, especially in high-dimensional situations, makes parameter selection difficult and sensitive to boundary conditions |
Robustness | Has good robustness to periodic noise data | Performs well for smooth changing physical phenomena, but is sensitive to noise |
Flexibility | Can adapt to multiple frequency components, but performs poorly on nonperiodic signals | Specially designed for specific geometric shapes with limited flexibility |
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
Shuai, Y.; Liu, P.; Han, H. A Fourier Fitting Method for Floating Vehicle Trajectory Lines. ISPRS Int. J. Geo-Inf. 2025, 14, 230. https://doi.org/10.3390/ijgi14060230
Shuai Y, Liu P, Han H. A Fourier Fitting Method for Floating Vehicle Trajectory Lines. ISPRS International Journal of Geo-Information. 2025; 14(6):230. https://doi.org/10.3390/ijgi14060230
Chicago/Turabian StyleShuai, Yun, Pengcheng Liu, and Hao Han. 2025. "A Fourier Fitting Method for Floating Vehicle Trajectory Lines" ISPRS International Journal of Geo-Information 14, no. 6: 230. https://doi.org/10.3390/ijgi14060230
APA StyleShuai, Y., Liu, P., & Han, H. (2025). A Fourier Fitting Method for Floating Vehicle Trajectory Lines. ISPRS International Journal of Geo-Information, 14(6), 230. https://doi.org/10.3390/ijgi14060230