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. https和http共存的nginx配置

    server {        listen       80;        listen      443 ssl;        server_name  test.xx.com;        ...

  2. MySQL索引的缺点以及MySQL索引在实际操作中有哪些事项

    以下的文章主要介绍的是MySQL索引的缺点以及MySQL索引在实际操作中有哪些事项是值得我们大家注意的,我们大家可能不知道过多的对索引进行使用将会造成滥用.因此MySQL索引也会有它的缺点: 虽然索引 ...

  3. js给定时器调用传递参数

    给定时器调用传递参数 无论是window.setTimeout 还是window.setInterval,在使用函数名作为调用句柄时都不 能带参数,而在许多场合必需要带参数,这就需要想方法解决.例如对 ...

  4. python compile

    compile(source, filename, mode[, flags[, dont_inherit]]) 参数source:字符串或者AST(Abstract Syntax Trees)对象. ...

  5. mysql 远程访问授权

    给mysql改了密码了,程序就不让登录了: mysql 网外链接 Access denied for user 这不能忍啊!咋办?授权呗! 命令行: GRANT ALL PRIVILEGES ON * ...

  6. Jfinal中定时器的初步探索(二)

    第一篇中增加的是程序代码的实现,本篇我们将通过配置文件进行定时器的配置,减少代码量,提高灵活性. 1.需要用到的文件:quartz.properties,据说这个文件如果没有的话,按默认的走,结果布署 ...

  7. startActivityForResult用法详解

    一.如果想在Activity中得到新打开Activity 关闭后返回的数据,需要使用系统提供的startActivityForResult(Intent intent, int requestCode ...

  8. php 连接测试sphinx

    shpinx.php <?php header("Content-type:text/html;charset=utf-8"); include 'SphinxClient. ...

  9. php 根据指定的键对多维数组进行排序

    根据指定的键对多维数组排序,可以按照多个键排序 我们通常有一些多维数组需要排序: $guys = array( array( 'name' => 'jake', 'score' => 80 ...

  10. (转)HelloWorld CMake CMake中构建静态库与动态库及其使用

    继续完善Hello World,建立它的共享库, 包括静态库和动态库. 本节的任务: 1,建立一个静态库和动态库,提供HelloFunc函数供其他程序编程使用,HelloFunc 向终端输出Hello ...