tracktable.feature.interleave_points module

Module contents

tracktable.feature.interleave_points.interleave_points_by_timestamp(*point_sources)[source]

From a series of point sources, generate a new sequence sorted by timestamp.

Given one or more point sources that are themselves sorted by timestamp, generate a new sequence containing all of the points from all sources, again sorted by increasing timestamp.

Note that this function reads all the points into memory in order to build a priority queue. If you’re feeling ambitious, feel free to write a new version that keeps only a single point in memory from each source at any time.

Parameters

*point_sources (iterables) – One or more iterables of points

Yields

TrajectoryPoint instances sorted by increasing timestamp