public class PolygonSmoother extends AbstractSmoother
Note: the code here is not that written by Maxim to accompany his algorithm description. Rather, it is an original implementation and any errors are my fault.
DEFAULT_CONTROL| Constructor and Description |
|---|
PolygonSmoother()
Default constructor.
|
PolygonSmoother(org.locationtech.jts.geom.GeometryFactory geomFactory)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
org.locationtech.jts.geom.Polygon |
smooth(org.locationtech.jts.geom.Polygon inputPoly,
double alpha)
Creates a new
Polygon whose exterior shell is a smoothed
version of the input Polygon. |
setControlpublic PolygonSmoother()
public PolygonSmoother(org.locationtech.jts.geom.GeometryFactory geomFactory)
geomFactory - an instance of GeometryFactory to use when
creating smoothed Geometry objectsIllegalArgumentException - if geomFactory is nullpublic org.locationtech.jts.geom.Polygon smooth(org.locationtech.jts.geom.Polygon inputPoly,
double alpha)
Polygon whose exterior shell is a smoothed
version of the input Polygon.
Note: this method presently ignores holes.
inputPoly - the input Polygonalpha - a value between 0 and 1 (inclusive) specifying the tightness
of fit of the smoothed boundary (0 is loose)PolygonCopyright © 2009–2018. All rights reserved.