NetTopologySuite
|
Computes the centroid of a IGeometry 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.
More...
Public Member Functions | |
Centroid (IGeometry geom) | |
Creates a new instance for computing the centroid of a geometry More... | |
Coordinate | GetCentroid () |
Gets the computed centroid. More... | |
Static Public Member Functions | |
static Coordinate | GetCentroid (IGeometry geom) |
Computes the centroid point of a geometry. More... | |
Computes the centroid of a IGeometry 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. If the input geometries are empty, a null
Coordinate is returned.
<version>1.7</version>
NetTopologySuite.Algorithm.Centroid.Centroid | ( | IGeometry | geom | ) |
Creates a new instance for computing the centroid of a geometry
|
static |
Computes the centroid point of a geometry.
geom | The geometry to use |
Coordinate NetTopologySuite.Algorithm.Centroid.GetCentroid | ( | ) |
Gets the computed centroid.
The centroid is computed from the highest dimension components present in the input. I.e. areas dominate lineal geometry, which dominates points. Degenerate geometry are computed using their effective dimension (e.g. areas may degenerate to lines or points)