Table of Contents

Property Centroid

Namespace
GeometryHelper.Geometry
Assembly
GeometryHelper.dll

Centroid

Gets the centroid of the face: the centroid of its boundary with its holes taken out, so a plate balances at this point whatever has been cut from it.

public GeoPoint2 Centroid { get; }

Property Value

GeoPoint2

Remarks

A face whose holes cancel its boundary has no centroid to give, and its boundary centroid is returned instead rather than a division by zero.

The holes are weighed however small the face: the square 0.001 by 0.001 with a hole 0.0004 by 0.0004 in its corner, of 8.4E-7 square units, balances at (0.000538, 0.000538), where an area of a millionth or less was taken for none and the boundary's centroid, (0.0005, 0.0005), given. Only a face whose area is lost in the rounding of the areas it is worked out from has none.