tracktable.filter.trajectory module¶
Module contents¶
tracktable.filter.trajectory - Filters that take trajectories as input
-
class
tracktable.filter.trajectory.ClipToTimeWindow[source]¶ Bases:
objectTruncate trajectories to fit within a time window
Given an iterable of Trajectory objects, return those portions of each trajectory that fit within the specified time window. Interpolate endpoints as necessary.
-
input¶ Source of Trajectory objects
- Type
iterable
-
start_time¶ Beginning time for window of interest
- Type
datetime
-
end_time¶ End time for window of interest
- Type
datetime
-
trajectories()[source]¶ Return sub-trajectories within window.
- Note: Since this is a generator, you can only traverse the sequence
once unless you collect it in a list yourself.
- Yields
- Trajectories derived from input trajectories. Each trajectory
is guaranteed to fall entirely within the window specified by self.start_time and self.end_time. If one of the input trajectories extends beyond that boundary, a new endpoint will be interpolated so that it begins or ends precisely at the boundary. Trajectories entirely outside the boundary will be returned as empty trajectories with 0 points.
-
-
class
tracktable.filter.trajectory.FilterByAltitude[source]¶ Bases:
objectFilter out trajectories that don’t intersect an interval of altitude
Given a source that produces Trajectories, return only those trajectories that have at least one point between min_altitude and max_altitude.
Like FilterByBoundingBox, no clipping will take place. If a trajectory crosses the specified interval at all then you will get the whole thing back.
-
input¶ Iterable containing Trajectory objects
- Type
iterable
-
-
class
tracktable.filter.trajectory.FilterByBoundingBox[source]¶ Bases:
objectFilterByBoundingBox: Eliminate trajectories that don’t intersect a given box
Given a source that produces Trajectories, return only those trajectories that intersect the specified bounding box. No clipping or subsetting is performed: if at least one point is within the desired region you will get the entire trajectory back.
-
input¶ Sequence of Trajectory objects
- Type
iterable
-
bbox_min¶ Southwest corner of bounding box
- Type
-
bbox_max¶ Northeast corner of bounding box
- Type
-