public class Centroid extends Object
Geometry of any dimension. If the geometry is nominally of higher dimension, but has lower
effective dimension (i.e. contains only components having zero length or area), the centroid will be computed as for the equivalent lower-dimension geometry. If the input geometry is empty, a
null Coordinate is returned.
http://www.faqs.org/faqs/graphics/algorithms-faq/ for further details of the basic approach. | Constructor and Description |
|---|
Centroid(Geometry
Creates a new instance for computing the centroid of a geometry
|
| Modifier and Type | Method and Description |
|---|---|
Coordinate |
getCentroid()
Gets the computed centroid.
|
static Coordinate |
getCentroid(Geometry
Computes the centroid point of a geometry.
|
public Centroid(Geometrygeom)
public static CoordinategetCentroid(Geometry geom)
geom - the geometry to use
public CoordinategetCentroid()