public class RamerDouglasPeucker extends Object
PolygonalChainby removing vertices which do not affect the shape of the curve to a given tolerance. The algorithm works by finding the point which is farthest from the line segment defined by the endpoints. If the distance is within a specified tolerance, all vertices are removed but the endpoints. Otherwise, the list of line segments is divided into two parts: from the first point to the farthest point, and from the farthest point to the last point, then the algorithm recursively calls itself with these two parts (and the farthest point is kept).
|Constructor and Description|
Create an algorithm instance with a given threshold for the maximum distance between the original chain and a point in the simplified chain.
|Modifier and Type||Method and Description|
Simplify the given polygonal chain.
public RamerDouglasPeucker(double threshold)
threshold- the threshold (non-negative)
Copyright © 2010-2018 Numerical Method Incorporation Limited. All Rights Reserved.