movingpandas.TrajectoryCollection.add_direction#

TrajectoryCollection.add_direction(overwrite=False, name='direction', n_threads=1)#

Add direction column and values to the trajectories.

The direction is calculated between consecutive locations. Direction values are in degrees, starting North turning clockwise.

Parameters:
  • overwrite (bool) – Whether to overwrite existing direction values (default: False)

  • name (str) – Name of the direction column (default: “direction”)

  • n_threads (int) – Number of threads to use for computation (default: 1)