On a slight tangent, I do not see Return Count Only available via the Tasks.Query Class.
var largest = e.FeatureSet.Features.Max(g => g.Geometry.GetArea()); var graphic = e.FeatureSet.Features.FirstOrDefault(g => g.Geometry.GetArea() == largest);
public static class GeometryExtension { public static double GetArea(this Geometry geom) { if (geom == null || geom.Extent == null) return 0; return geom.Extent.Height * geom.Extent.Width; } public static int GetVerticesCount(this Geometry geom) { if (geom is Polygon) { Polygon polygon = geom as Polygon; if (polygon.Rings == null) return 0; int count = 0; foreach (var pc in polygon.Rings) count += pc.Count; return count; } return 0; } }
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.