polyline转换成polygon

//////////////////////////polyline转换成polygon///////////////////////////////

            //IGeometryCollection geometryCollection = polyline as IGeometryCollection;
            //ISegmentCollection segmentCollction;
            //IGeometryCollection polygon = new PolygonClass();
            //object o = Type.Missing;
            //for (int i = 0; i < geometryCollection.GeometryCount; i++)
            //{
            //    segmentCollction = new RingClass();
            //    segmentCollction.AddSegmentCollection(geometryCollection.get_Geometry(i) as ISegmentCollection);
            //    IRing ring = segmentCollction as IRing;
            //    ring.Close();
            //    polygon.AddGeometry(ring as IGeometry, ref o, ref o);
            //}

转载自:https://blog.csdn.net/langyan122/article/details/34424107

You may also like...