Rotation invariant GPS trajectory mining

Maximilian Leodolter, Claudia Plant, Norbert BrändleGeoInformatica 2024 · DOI

Abstract

Identifying similar movement patterns in GPS data is a fundamental task in spatial data mining. However, traditional methods often fail when patterns are rotated, scaled, or shifted. This paper presents S3KR (Sliding-Shifting-Scaling-Kabsch-Rotation), an algorithm that leverages Procrustes analysis to achieve rotation-invariant trajectory matching. By optimizing the Kabsch algorithm for a sliding window context, S3KR provides up to a 470x speedup over existing methods while maintaining superior accuracy.

Introduction

A significant challenge in trajectory mining is the variance in how identical maneuvers are recorded. For example, a "sharp left turn" performed at different intersections or headings results in mathematically distinct GPS coordinate sequences. Traditional approaches struggle with three primary variances:

  1. Rotation: Patterns depend on the vehicle's initial heading.
  2. Scaling: The physical size of a maneuver (e.g., a U-turn) varies by vehicle type.
  3. Shifting: Absolute coordinates are irrelevant to the shape of the motion.

While some methods use "arc-angles" to achieve invariance, they are often highly sensitive to sensor noise. S3KR addresses these issues by treating trajectories as shapes and using statistical shape analysis to find the best fit.

Methodology

The core of S3KR is the application of Procrustes analysis via the Kabsch algorithm. This method finds the optimal rotation matrix to minimize the root-mean-squared deviation (RMSD) between a query pattern and a candidate trajectory segment.

Overview of the S3KR sliding window approach on a real-world map, showing the transformation of a query segment to match local trajectories.

To make this computationally feasible for large datasets, the authors introduced several optimizations:

  • Incremental Updates: Means and variances are updated incrementally as the window slides.
  • Fixed Reference Frame: All segments are rotated to a standard orientation to avoid redundant pairwise calculations.
  • Early Abandoning: The algorithm stops calculating distances once they exceed a predefined threshold, leveraging the monotonicity of Euclidean distance.
Step-by-step transformation process: (a-b) original trajectories, (c) shifting to origin, (d) scaling, (e) optimal rotation, and (f) final distance calculation.

Furthermore, the authors proved that their distance function is a mathematical metric, enabling the use of efficient indexing structures like M-Trees to speed up nearest-neighbor searches by over 10x.

Experimental Evaluation

The S3KR algorithm was tested across diverse datasets to ensure robustness:

  • Synthetic Data: Random walks were used to evaluate robustness against noise and geometric transformations.
  • UCI Character Trajectories: A benchmark of handwritten symbols used to test shape recognition accuracy.
  • Maritime AIS Data: Analysis of ship movements near Copenhagen to identify repetitive dredging patterns.
  • Urban GPS Data: Public transport logs from Vienna and Zurich to distinguish between train and tram maneuver signatures.

Results

S3KR demonstrated significant improvements in both accuracy and performance:

  • Accuracy: On the UCI benchmark, S3KR achieved an F1 score of 89.4%, outperforming the state-of-the-art cMass (80.0%) and standard z-normalization (57.3%).
  • Efficiency: The algorithm was 10 to 470 times faster than competing methods. A single distance calculation for 1,000 points took only 0.05ms.
  • Real-world Application: In maritime tracking, S3KR identified dredging patterns 65x faster than brute-force methods. In urban studies, it successfully distinguished the "gentle" curves of trains from the "sharp" street-corner turns of trams.

Conclusion

S3KR provides a robust and efficient framework for rotation-invariant trajectory mining. By treating GPS paths as shapes rather than just coordinate sequences, it overcomes the limitations of heading-dependent analysis. Future work aims to integrate Dynamic Time Warping (DTW) to handle temporal scaling (varying speeds) while maintaining the high performance of the Procrustes-based approach.

Summary updated

BibTeX
@article{leodolter2024rotation,
  author = {Maximilian Leodolter and Claudia Plant and Norbert Brändle},
  title = {{Rotation invariant GPS trajectory mining}},
  journal = {GeoInformatica},
  year = {2024},
  doi = {10.1007/s10707-023-00495-4},
}
Figure