movingpandas.Trajectory.get_length#

Trajectory.get_length(units=(None, None, None, None))#

Return the length of the trajectory.

Length is calculated using CRS units, except if the CRS is geographic (e.g. EPSG:4326 WGS84) then length is calculated in meters.

If units have been declared:

  • For geographic projections, in declared units

  • For known CRS units, in declared units

  • For unknown CRS units, in declared units as if CRS is in meters

Parameters:

units (tuple(str)) – Units in which to calculate length values (default: CRS units) For more info, check the list of supported units at https://movingpandas.org/units

Returns:

Length of the trajectory

Return type:

float