From OpenStreetMap Wiki
< JOSM‎ | Plugins
Jump to: navigation, search

Why using the RemoveRedundantPoints plugin?

220px-Douglas-Peucker animated.gif

The purpose of the plugin is, given a curve composed of line segments, to find a similar curve with fewer points. The algorithm defines 'dissimilar' based on the maximum distance between the original curve and the simplified curve. The simplified curve consists of a subset of the points that defined the original curve.

Mathematical bases(Douglas–Peucker algorithm)

The starting curve is an ordered set of points or lines and the distance dimension threshold > 0.

The algorithm recursively divides the line. Initially it is given all the points between the first and last point. It automatically marks the first and last point to be kept. It then finds the point that is furthest from the line segment with the first and last points as end points (this point is obviously furthest on the curve from the approximating line segment between the end points). If the point is closer than threshold to the line segment then any points not currently marked to be kept can be discarded without the simplified curve being worse than threshold.

If the point furthest from the line segment is greater than threshold from the approximation then that point must be kept. The algorithm recursively calls itself with the first point and the worst point and then with the worst point and the last point (which includes marking the worst point being marked as kept).

When the recursion is completed a new output curve can be generated consisting of all (and only) those points that have been marked as kept.

The implementation of this algorithm can be seen in the source code of the plugin.


The plugin should be available in your JOSM Plugins preference window under "RemoveRedundantPoints" or you can download it from [1].


  1. Select an way and select from the Tools menu Imaa4.png or Shift+F on the way

or Shift+F on the way Imaggg1.png

2. At the User Interface that are showing Imaaa2.png, user set the threshold distance.

3.The optimal way based at essential points Imaggg3.png