org.jaitools.jts
Class PolygonSmoother
java.lang.Object
org.jaitools.jts.AbstractSmoother
org.jaitools.jts.PolygonSmoother
public class PolygonSmoother
- extends AbstractSmoother
Polygon smoothing by interpolation with cubic Bazier curves.
This code implements an algorithm which was devised by Maxim Shemanarev
and described by him at:
http://www.antigrain.com/research/bezier_interpolation/index.html.
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.
- Since:
- 1.1
- Version:
- $Id$
- Author:
- Michael Bedward
|
Method Summary |
com.vividsolutions.jts.geom.Polygon |
smooth(com.vividsolutions.jts.geom.Polygon inputPoly,
double alpha)
Creates a new Polygon whose exterior shell is a smoothed
version of the input Polygon. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PolygonSmoother
public PolygonSmoother()
- Default constructor.
PolygonSmoother
public PolygonSmoother(com.vividsolutions.jts.geom.GeometryFactory geomFactory)
- Constructor.
- Parameters:
geomFactory - an instance of GeometryFactory to use when
creating smoothed Geometry objects
- Throws:
IllegalArgumentException - if geomFactory is null
smooth
public com.vividsolutions.jts.geom.Polygon smooth(com.vividsolutions.jts.geom.Polygon inputPoly,
double alpha)
- Creates a new
Polygon whose exterior shell is a smoothed
version of the input Polygon.
Note: this method presently ignores holes.
- Parameters:
inputPoly - the input Polygonalpha - a value between 0 and 1 (inclusive) specifying the tightness
of fit of the smoothed boundary (0 is loose)
- Returns:
- the smoothed
Polygon
Copyright © 2009-2015. All Rights Reserved.