ArcEngine 岛状多边形外环内环的获取

编程入门 行业动态 更新时间:2024-10-07 12:28:50

ArcEngine 岛状多边形外环<a href=https://www.elefans.com/category/jswz/34/1760507.html style=内环的获取"/>

ArcEngine 岛状多边形外环内环的获取

ArcEngine岛状多边形获取其内部环

查阅了帮助文档相关接口,内部环的获方法get_InteriorRingBag()

需要外部环作为参数.而外部环可以直接通过ExteriorRingBag属性获取.

具体参考下述代码(代码参考官方帮助文档):

IPolygon4 pMergerPolygon=pFeature.Shape as IPolygon4;
IGeometryBag pOutGeometryBag = pMergerPolygon.ExteriorRingBag;  //获取外部环
IGeometryCollection pOutGmtyCollection = pOutGeometryBag as IGeometryCollection;for (int i = 0; i < pOutGmtyCollection.GeometryCount; i++)  //对外部环遍历
{IGeometry pOutRing = pOutGmtyCollection.get_Geometry(i); //外部环//【此处可以对外部环进行操作】IPointCollection pOutRingCollection = pOutRing as IPointCollection;for (int j = 0; j < pOutRingCollection.PointCount; j++){IPoint pOutRingPoint = pOutRingCollection.get_Point(j);//获取外环上的点}IGeometryBag pInteriotGeometryBag = pMergerPolygon.get_InteriorRingBag(pOutRing as IRing);  //获取内部环IGeometryCollection pInteriorGeometryCollection = pInteriotGeometryBag as IGeometryCollection;for (int j = 0; j < pInteriorGeometryCollection.GeometryCount; j++){IGeometry pInteriorGeometry = pInteriorGeometryCollection.get_Geometry(j);//pInteriorGeometry即为多边形的内部环}
}

更多推荐

ArcEngine 岛状多边形外环内环的获取

本文发布于:2024-02-13 21:04:19,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1760301.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:内环   多边形   ArcEngine

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!