arcgisengine 线转面方法

来源:互联网 发布:交通灯单片机程序设计 编辑:程序博客网 时间:2024/05/21 02:50

1、用IGeometryCollection

//ISegmentCollection pRing;

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

                    //pNFeature.Shape = polygon as IGeometry;

2、用ITopologicalOperator 建缓冲区成面

                    IPolygon polygon = new PolygonClass();
                    ITopologicalOperator pTopologicalOperator = (IPolyline)pGeo as ITopologicalOperator;
                    polygon = pTopologicalOperator.Buffer(0.5) as IPolygon;
                    pNFeature.Shape = polygon;
0 0
原创粉丝点击