movingpandas.TrajectoryCollection.add_speed#
- TrajectoryCollection.add_speed(overwrite=False, name='speed', units=(None, None, None, None), n_threads=1)#
Add speed column and values to the trajectories.
Speed is calculated as CRS units per second, except if the CRS is geographic (e.g. EPSG:4326 WGS84) then speed is calculated in meters per second.
- Parameters:
overwrite (bool) – Whether to overwrite existing speed values (default: False)
name (str) – Name of the speed column (default: speed)
units (tuple(str)) –
Units in which to calculate speed
- distancestr
Abbreviation for the distance unit (default: CRS units, or metres if geographic)
- timestr
Abbreviation for the time unit (default: seconds)
For more info, check the list of supported units at https://movingpandas.org/units
n_threads (int) – Number of threads to use for computation (default: 1)