3
$\begingroup$

I have a polyline and I want to simplify it with Douglas-Peucker. It's an easy algorithm, but what if there are points with the same distance. What point should I select? Is there a reasonable solution?

enter image description here

$\endgroup$

1 Answer 1

2
$\begingroup$

I would consider the curvature in that case too. If the curvature is small - then it is a flat region - so you can safely remove it - your 4th point for example. If the curvature is large (your 5th point for example), even if the distance is the same, you should most likely leave it alone.

I would actually recommend a curvature based method coming before Douglas-Peucker.

$\endgroup$
2
  • $\begingroup$ Could you please suggest a good "curvature based method"? $\endgroup$
    – rr84
    Commented Oct 11, 2019 at 17:17
  • $\begingroup$ You can start by removing points with the smallest curvature (as an approximation, you can use the angle that they form). $\endgroup$
    – lightxbulb
    Commented Oct 11, 2019 at 17:41

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.