movingpandas.Trajectory.intersection#
- Trajectory.intersection(feature, point_based=False)#
Return the trajectory segments that intersects 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:
Segments intersecting with the feature
- Return type: