movingpandas.TrajectoryCollection.add_distance#
- TrajectoryCollection.add_distance(overwrite=False, name='distance', units=None, n_processes=1, **kwargs)#
Add distance column and values to the trajectories.
- Parameters:
overwrite (bool) – Whether to overwrite existing distance values (default: False)
name (str) – Name of the distance column (default: “distance”)
units (str) – Units in which to calculate distance values (default: CRS units) For more info, check the list of supported units at https://movingpandas.org/units
n_processes (int or None, optional) – Number of processes to use for computation (default: 1). If set to None, the number of processes will be set to os.cpu_count() (or os.process_cpu_count() in Python 3.13+), enabling full CPU utilization via multiprocessing.
n_threads (int, optional) – DEPRECATED. Use n_processes instead. This parameter will be removed in a future version.