Solved! Go to Solution.
Does the Centroid property off the IArea interface give you a more accurate center?
Envelope, GeoEllipse, GeoPolygon, Multipatch, Polygon, and Ring are all geometry types that implement IArea.
Does the Centroid property off the IArea interface give you a more accurate center?
Envelope, GeoEllipse, GeoPolygon, Multipatch, Polygon, and Ring are all geometry types that implement IArea.
private IPoint GetCentroid(IFeature feature) { IArea area = feature.Shape as IArea; if (area == null) return null; // Or throw an exception here, or handle other Geometry types that don't implement IArea, etc. return area.Centroid; }