public class Centroid extends Object
Geometry of any dimension.
For collections the centroid is computed for the collection of
non-empty elements of highest dimension.
The centroid of an empty geometry is null.
InteriorPoint,
MaximumInscribedCircle,
LargestEmptyCircle| Constructor and Description |
|---|
Centroid(Geometry geom)
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 geom)
Computes the centroid point of a geometry.
|
public Centroid(Geometry geom)
public static Coordinate getCentroid(Geometry geom)
geom - the geometry to usepublic Coordinate getCentroid()
Copyright © 2024. All rights reserved.