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) |
int |
simplify(PointList points,
int fromIndex,
int lastIndex,
boolean compress)
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)
public int simplify(PointList points, int fromIndex, int lastIndex, boolean compress)
points. The fromIndex and lastIndex
are guaranteed to be kept.points - The PointList to simplifyfromIndex - Start index to simplify, should be <= lastIndexlastIndex - Simplify up to this indexcompress - Whether or not the points shall be compressed or not, if set to false no points
are actually removed, but instead their lat/lon/ele is only set to NaNCopyright © 2012–2020. All rights reserved.