movingpandas.TrajectoryCollection.intersection#
- TrajectoryCollection.intersection(feature, point_based=False)#
Intersect trajectories with the given polygon feature.
Feature attributes are appended to the trajectory’s DataFrame.
By default, the trajectory’s line representation is clipped by the polygon. If pointbased=True, the trajectory’s point representation is used instead, leading to shorter segments.
- Parameters:
feature (shapely Feature) – Feature to intersect with
point_based (bool) – Clipping method
- Returns:
Intersecting trajectory segments
- Return type: