Class 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 Detail

      • PolylineThinner

        public PolylineThinner()
        Standard constructor.
    • 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 reduced
        neighborList - 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.