Calculate compression of trajectory.
create_traj_ranges
Fills in the trajectory range.
# Adapted from https://stackoverflow.com/a/40624614
rdp
Trajectory module