I'm new at PostGIS and I have to do a project for my university course. I'm trying to analyze a trajectory of points that I downloaded from my runtastic app but it's a mess. There are some points where the trajectory goes back and forth (green line in the image), while my real trajectory was straight (pink).

enter image description here

Is there a query or function I can use to delete those points and make my trajectory a bit more straight?

  • 1
    It's not an easy problem as it would be hard to tell the difference between a random loop, as in your image, and a genuine sharp turn at a junction. You could probably write a rule to do this by comparing the angles between consecutive linestrings and removing those that exceed some tolerance, but, it's a non-trivial problem. – John Powell Feb 9 at 10:38

Your Answer

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

Browse other questions tagged or ask your own question.