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; }
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.