<p>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.</p>

<p>I would actually recommend a curvature based method coming before Douglas-Peucker.</p>

CC BY-SA 4.0
2019-10-11T17:17:44.130Z
Could you please suggest a good "curvature based method"?
rr84
CC BY-SA 4.0
2019-10-11T17:41:06.550Z
You can start by removing points with the smallest curvature (as an approximation, you can use the angle that they form).
lightxbulb
CC BY-SA 4.0
2019-10-09T21:45:42.840Z
2019-10-09T21:45:42.840Z
lightxbulb
<p>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?</p>

<p><a href="https://i.sstatic.net/PLKly.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/PLKly.png" alt="enter image description here"></a></p>

<2d-graphics>
Douglas-Peuker and equal distances
rr84
# Douglas-Peuker and equal distances

(Asked by: username_0 on 2019-10-09)

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](https://i.sstatic.net/PLKly.png)](https://i.sstatic.net/PLKly.png)

**Tags:** 2d-graphics


---

## 1 answers

### Answer by username_1 on 2019-10-09. Score: 2 | Accepted answer

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.

> **Comments:**
> **username_0**: Could you please suggest a good "curvature based method"?  
> **username_1**: You can start by removing points with the smallest curvature (as an approximation, you can use the angle that they form).  

---

