Are any of the famous trajectory similarity measurement methods such as Dynamic Time Warping(DTW), Edit Distance based methods or Longest Common Subsequence based Measures implemented in shapely or any other python based libraries?

My end goal is to find similar sections between two trajectories. I do not care about the time stamps and when the trajectories are traversed. The lengths may be different. A short part of one trajectory may overlap with another trajectory.

1 Answer 1


For Dynamic Time Warping, it seems that the feature is in development on Scipy https://github.com/scipy/scipy/issues/7638, keep an eye on it and in the meantime you can try using the implementation from this Github repository which is released as a Python package called pydtw.

For the Edit Distance there is a small Python package called editdistance (https://pypi.org/project/editdistance/) that seems to come from this Github repository.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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