movingpandas.Trajectory.distance#
- Trajectory.distance(other, units=(None, None, None, None))#
Return the minimum distance to the other geometric object (based on shapely https://shapely.readthedocs.io/en/stable/manual.html#object.distance).
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:
other (shapely.geometry or Trajectory) – Other geometric object or trajectory
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
- Returns:
Distance
- Return type:
float