public class LineSmoother extends AbstractSmoother
To use the same algorithm for LineStrings we add a dummy vertex to
either end, calculate control points for just the real vertices.
DEFAULT_CONTROL| Constructor and Description |
|---|
LineSmoother()
Default constructor.
|
LineSmoother(org.locationtech.jts.geom.GeometryFactory geomFactory)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
org.locationtech.jts.geom.LineString |
smooth(org.locationtech.jts.geom.LineString ls,
double alpha)
Creates a new
LineString which is a smoothed version of
the input LineString. |
setControlpublic LineSmoother()
public LineSmoother(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.LineString smooth(org.locationtech.jts.geom.LineString ls,
double alpha)
LineString which is a smoothed version of
the input LineString.ls - the input LineStringalpha - a value between 0 and 1 (inclusive) specifying the tightness
of fit of the smoothed boundary (0 is loose)LineStringCopyright © 2009–2018. All rights reserved.