Class DouglasPeuckerLineSimplifier


  • class DouglasPeuckerLineSimplifier
    extends java.lang.Object
    Simplifies a linestring (sequence of points) using the standard Douglas-Peucker algorithm.
    Version:
    1.7
    • Field Detail

      • usePt

        private boolean[] usePt
      • distanceTolerance

        private double distanceTolerance
    • Constructor Detail

      • DouglasPeuckerLineSimplifier

        public DouglasPeuckerLineSimplifier​(Coordinate[] pts)
    • Method Detail

      • setDistanceTolerance

        public void setDistanceTolerance​(double distanceTolerance)
        Sets the distance tolerance for the simplification. All vertices in the simplified linestring will be within this distance of the original linestring.
        Parameters:
        distanceTolerance - the approximation tolerance to use
      • simplifySection

        private void simplifySection​(int i,
                                     int j)