arcgis pro 二次开发——获取图形中心点坐标
List
list2D.Add(new Coordinate2D(0, 0));
list2D.Add(new Coordinate2D(0, 2));
list2D.Add(new Coordinate2D(2, 2));
list2D.Add(new Coordinate2D(2, 0));
Polygon polygon = PolygonBuilder.CreatePolygon(list2D, SpatialReferences.WGS84);
// verify it is simple
bool isSimple = GeometryEngine.Instance.IsSimpleAsFeature(polygon);
// find the centroid
MapPoint centroid = GeometryEngine.Instance.Centroid(polygon);
// centroid.X = 1
// ce
共有 0 条评论