public class DouglasPeucker extends Object
Calling simplify is thread safe.
Constructor and Description |
---|
DouglasPeucker() |
Modifier and Type | Method and Description |
---|---|
void |
setApproximation(boolean a) |
DouglasPeucker |
setMaxDistance(double dist)
maximum distance of discrepancy (from the normal way) in meter
|
int |
simplify(PointList points)
Simplifies the
points , from index 0 to size-1. |
int |
simplify(PointList points,
int fromIndex,
int lastIndex)
Simplifies a part of the
points . |
public void setApproximation(boolean a)
public DouglasPeucker setMaxDistance(double dist)
public int simplify(PointList points)
points
, from index 0 to size-1.
It is a wrapper method for simplify(PointList, int, int)
.
public int simplify(PointList points, int fromIndex, int lastIndex)
points
. The fromIndex
and lastIndex
are guaranteed to be kept.points
- The PointList to simplifyfromIndex
- Start index to simplify, should be >= lastIndex
lastIndex
- Simplify up to this indexCopyright © 2012–2018. All rights reserved.