IPointCollection 到 IPolygon的转换

IPoint pPoint = new PointClass();
            //IPolygon pPolygon1 = new PolygonClass();
            IPointCollection pPointCollection1 = new PolygonClass();

object _missing = Type.Missing;
            double x, y;
            for (int i = 0; i < pAllPnts.Count; i++)
            {
                x = pAllPnts[i].X;
                y = pAllPnts[i].Y;
                pPoint = new PointClass();
                pPoint.PutCoords(x, y);
                pPointCollection1.AddPoint(pPoint, ref _missing, ref _missing);
            }
            IPolygon pPolygon = new PolygonClass();
            pPolygon = (IPolygon)pPointCollection1;

IArea pArea;

IFeature pFeature = pFC.CreateFeature();
            pFeature.Shape = pPolygon;
            //Abs(pArea.Area());
            pArea = (IArea)pPolygon;
            System.Windows.Forms.MessageBox.Show(pArea.Area.ToString());
            pFeature.Store();

List<IPoint> to IPointCollection to IPolygon的更多相关文章

  1. 【ESRI论坛6周年征文】ArcEngine注记(Anno/ Label/Element等)处理专题 -入门篇

    原发表于ESRI中国社区,转过来.我的社区帐号:jhlong http://bbs.esrichina-bj.cn/ESRI/viewthread.php?tid=122097 ----------- ...

  2. 创建面注记PolygonElement

    1.根据4点创建一个面 /// <summary> /// 根据4个点创建图形,点序要顺时针 /// </summary> /// <param name="p ...

  3. AE指定字段转成注记

    转自原文 ae指定字段转成注记 ArcMap中有一个功能是Label Features,就是可以将图层内指定字段值显示以Label形式显示在主窗口上,在Label Features后,用右键点击图层, ...

  4. IPoilygon转IPoint

    private void 河流面转点ToolStripMenuItem_Click(object sender, EventArgs e) { ESRI.ArcGIS.Geodatabase.IWor ...

  5. IPointCollection转IPolyline

    IPointCollection转线IPolyline: IPolyline pl = new PolylineClass(); IPointCollection ptc = pl as IPoint ...

  6. 找个输入IPoint在某个FeatureClass上距离最近的要素

      /// <summary> /// 得到输入点在输入图层上的最近点 /// </summary> /// <param name="randomPoints ...

  7. IPoint从自定义的投影坐标系转换到自定义的地理坐标系

    IPoint pointStart = new PointClass(); pointStart = xyPolyline.FromPoint; ISpatialReferenceFactory pS ...

  8. 判断IFeatureClass图形是否含有Z值信息,若有为IPoint赋Z值

    判断IFeatureClass图形是否含有Z值信息 IFeatureClass featureClass = this.pLayer.FeatureClass; string shapeFieldNa ...

  9. IPointCollection,ISegmentCollection和IGeometryCollection

    Engine 提供了三个主要的几何图形集合接口用于对几何对象的操作,分别是 IPointCollection,ISegmentCollection 和 IGeometryCollection,这些接口 ...

随机推荐

  1. HTML相对路径 当前目录、上级目录、根目录、下级目录表示法

    文件引用时经常需要用到相对目录.如(js,css,图片等) "./"  ---------       源代码所在的当前目录(可省略) "../"  ----- ...

  2. 数据导出至Excel文件--好库编程网http://code1.okbase.net/codefile/SerializeHelper.cs_2012122018724_118.htm

    using System; using System.IO; using System.Data; using System.Collections; using System.Data.OleDb; ...

  3. Oracle RAC环境的日志体系

    转摘:http://blog.itpub.net/22664653/viewspace-722463/ 在Oracle RAC环境中比单个系统的日志体系要复杂:见下图: 简单介绍一下有关Oracle集 ...

  4. window.location.search

    http://i.cnblogs.com/EditPosts.aspx?opt=1&opt2=x 就拿上面这个URL来说window.location.search的返回值为opt=1& ...

  5. Struts2 - Study 1

    领略下传说中的Struts2,写了个小例子,有点意思.比起.net中的MVC有意思的在于它是你自己一步步去配置实现,想怎么搞就怎么搞,.net的MVC,它干了什么事你完全不知,只不过知道怎么用而已. ...

  6. Angular学习(8)- directive

    <!DOCTYPE html> <html ng-app="MyApp"> <head> <title>Study 9</ti ...

  7. js 标签云效果

    下载:http://files.cnblogs.com/zjfree/js_tag_list.rar 效果如下: 源码如下: <html> <head> <meta ht ...

  8. dismissViewControllerAnimated有延迟

    dismissViewControllerAnimated:completion:在应用中运行正常,就是不知道为什么出现了几秒钟的延迟: [api loginWithUsername:[dict ob ...

  9. liveusb-creator

    liveusb-creator The liveusb-creator is a cross-platform tool for easily installing live operating sy ...

  10. Puppet master/agent installation on RHEL7

    ==================================================================================================== ...