Module xt

Module xt 

Source
Expand description

Cross-track distance calculation implementations.

This module provides different methods for calculating the perpendicular distance from a point to a line segment, which is the core operation in the Douglas-Peucker algorithm.

The choice of distance calculation method affects both accuracy and performance:

  • XtGreatCircle: Most accurate for geographic data, works globally
  • XtEnu: Good balance of accuracy and performance for regional data
  • XtEuclid: Fastest, suitable for projected or non-geographic data

Structs§

XtEnu
East-North-Up (ENU) planar projection distance calculation.
XtEuclid
Raw Euclidean distance calculation between coordinates.
XtGreatCircle
Great circle distance calculation using spherical geometry.

Traits§

PerpDistance
Trait for calculating perpendicular distance from a point to a line segment.