Is there an algorithm to perform a smoothing of a linestring and maintain the original points?

  • 1
    smoothing and maintaining the original points is impossible, the act of smoothing must move the points? – Ian Turton Feb 9 '17 at 8:55
  • All the nodes of the original line or just the start and end node? – Hasan Mustafa Feb 9 '17 at 10:03

If you use shapely, you can try the simplify(tolerance) method on LineString objects, which is based on the Ramer–Douglas–Peucker algorithm.

It's more of a simplifying algorithm than a smoothing one; but sometimes simpler linestrings happen to be smoother. Give it a try.

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.