public class VisvalingamLineSimplification extends Object
This class is based on the algorithm described in Visvalingam, M. & Whyatt, Duncan. (1993). Line generalisation by repeated elimination of points. Cartographic Journal, The. 30. 46-51. 10.1179/000870493786962263.
| Constructor and Description |
|---|
VisvalingamLineSimplification() |
| Modifier and Type | Method and Description |
|---|---|
void |
report(PrintStream ps) |
int |
simplify(int nPoints,
double[] xy,
double areaThreshold)
Simplify the geometry of the input line or polygon by progressively
removing points related to small-area features.
|
public int simplify(int nPoints,
double[] xy,
double areaThreshold)
Coordinates are given as an array in the order (x0, y0, x1, y1, etc.).
nPoints - the number of points in the feature.xy - the coordinates of the featureareaThreshold - the area threshold to be used as a reduction criterion.public void report(PrintStream ps)
Copyright © 2021. All rights reserved.