com.vividsolutions.jts.simplify

Class DouglasPeuckerLineSimplifier


public class DouglasPeuckerLineSimplifier
extends java.lang.Object

Simplifies a linestring (sequence of points) using the standard Douglas-Peucker algorithm.
Version:
1.7

Constructor Summary

DouglasPeuckerLineSimplifier(Coordinate[] pts)

Method Summary

void
setDistanceTolerance(double distanceTolerance)
Sets the distance tolerance for the simplification.
Coordinate[]
simplify()
static Coordinate[]
simplify(Coordinate[] pts, double distanceTolerance)

Constructor Details

DouglasPeuckerLineSimplifier

public DouglasPeuckerLineSimplifier(Coordinate[] pts)

Method Details

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

simplify

public Coordinate[] simplify()

simplify

public static Coordinate[] simplify(Coordinate[] pts,
                                    double distanceTolerance)