public class Centroid extends Object
Geometryof 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
nullCoordinate is returned.
http://www.faqs.org/faqs/graphics/algorithms-faq/for further details of the basic approach.
|Constructor and Description|
Creates a new instance for computing the centroid of a geometry
|Modifier and Type||Method and Description|
Gets the computed centroid.
Computes the centroid point of a geometry.
public Centroid(Geometry geom)
public static Coordinate getCentroid(Geometry geom)
geom- the geometry to use
public Coordinate getCentroid()
Copyright © 2020. All rights reserved.