Package org.locationtech.jts.simplify
Class DouglasPeuckerLineSimplifier
java.lang.Object
org.locationtech.jts.simplify.DouglasPeuckerLineSimplifier
Simplifies a linestring (sequence of points) using
the standard Douglas-Peucker algorithm.
- Version:
- 1.7
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate double
private Coordinate[]
private LineSegment
private boolean[]
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
setDistanceTolerance
(double distanceTolerance) Sets the distance tolerance for the simplification.simplify()
static Coordinate[]
simplify
(Coordinate[] pts, double distanceTolerance) private void
simplifySection
(int i, int j)
-
Field Details
-
pts
-
usePt
private boolean[] usePt -
distanceTolerance
private double distanceTolerance -
seg
-
-
Constructor Details
-
DouglasPeuckerLineSimplifier
-
-
Method Details
-
simplify
-
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
-
simplifySection
private void simplifySection(int i, int j)
-