Plot only trajectory segments exceeding length threshold

Given a Pandas DataFrame with millions of location records (lat and lon column) for multiple moving objects, is there an elegant way to plot only segments (connecting consecutive location records of the same moving object) that exceed a certain minimum length? does not go into much detail and any styling I apply to the path (as described in gets lost during datashading.

I can achieve the desired results using GeoPandas & geoviews but it’s rather slow.

I’ve worked out a work-around: see section A-5) Gaps in trajectories in but it’s quite tedious and I wonder if I’m missing anything.

1 Like