C#将多个polygon进行合并为一个

定义了一个GeometryCollection对象:

                ESRI.ArcGIS.Geometry.IGeometryCollection pGeometryCollection = new ESRI.ArcGIS.Geometry.GeometryBagClass();

添加一到多个Geometry对象后,进行合并操作:

                    ESRI.ArcGIS.Geometry.ITopologicalOperator pNewPolygon = new ESRI.ArcGIS.Geometry.PolygonClass() as ESRI.ArcGIS.Geometry.ITopologicalOperator;
                    pNewPolygon.ConstructUnion(pGeometryCollection as ESRI.ArcGIS.Geometry.IEnumGeometry);
                    ESRI.ArcGIS.Geometry.IPolygon pPolygon = pNewPolygon as ESRI.ArcGIS.Geometry.IPolygon;

猜你喜欢

转载自blog.csdn.net/a_dev/article/details/79884073