1、获取选中图形:ISelectionSet pSelSet = (pFeaLyr as IFeatureSelection).SelectionSet;
pSelSet.Search(null, false, out pCursor);
IFeatureCursor pFeaCursor = pCursor as IFeatureCursor;
2、利用Union工具组合所有图形
IGeometryBag pGeoBag = new GeometryBagClass();
IGeometryCollection pGeoCol = pGeoBag as IGeometryCollection;
3、判断是否为外环图形:
IPolygon pGeoPolygon = pGeometry as IPolygon;
&

本文介绍了如何在ArcEngine中组合选中的相邻图形。首先,通过ISelectionSet获取选中的图形;接着,使用Union工具将所有图形组合到一个GeometryBag中;然后,判断并处理外环图形;最后,通过ConnectedComponentBag将相邻图形合并成一个。
最低0.47元/天 解锁文章
920

被折叠的 条评论
为什么被折叠?



