Package org.tinfour.utils
Class PolylineThinner
- java.lang.Object
-
- org.tinfour.utils.PolylineThinner
-
public class PolylineThinner extends Object
Provides utilities for reducing the number of points in a polygon or line feature by using Visvalingam's algorithm.
-
-
Constructor Summary
Constructors Constructor Description PolylineThinner()Standard constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IPolylinethinPoints(IPolyline feature, List<IPolyline> neighborList, double threshold)Given a feature, apply Visvalingam's algorithm to reduce the complexity of the feature geometry.
-
-
-
Method Detail
-
thinPoints
public IPolyline thinPoints(IPolyline feature, List<IPolyline> neighborList, double threshold)
Given a feature, apply Visvalingam's algorithm to reduce the complexity of the feature geometry. Features are compared against their neighbors to ensure that reductions in line complexity do not introduce intersections of line segments to the collection.- Parameters:
feature- the feature to be reducedneighborList- a potentially empty list of neighboring features (null values are allowed); this list is allowed to include the input feature itself.threshold- the value to be used for the Visvalingham area criterion.- Returns:
- if points were removed from the feature, a new instance reflecting the changed geometry; if the feature was unchanged, a null.
-
-