1

I have a set of ship trajectory points that were irregularly sampled and I would like to resample them to a fixed frequency (e.g. every minute).

Rather than just linearly interpolating between latitude and longitude, I would like to do this in a way that smooths according to course (COG) and speed (SOG).

Here is an example of the data:

Time              Lat    Lon    COG  SOG                                                         
2019-05-08 00:16  36.25  14.82  211  8.0
2019-05-08 00:28  36.23  14.80  221  7.7
2019-05-08 00:41  36.21  14.77  222  8.3

And here is a toy diagram explaining what I am trying to do. Instead of the first, I would like the second: enter image description here

Is there a simple way to achieve this using Python libraries? I am hoping there is a built-in method out there that can do this in a few lines :)

1

I think you could use Traja library (https://traja.readthedocs.io/en/latest/rediscretize.html) to resample your own data into the constant time interval that you want.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for?Browse other questions tagged or ask your own question.