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. MongoDB 入门与实例

    一.准备工作 1. 下载mongoDB 下载地址:http://www.mongodb.org/downloads 选择合适你的版本 相关文档:http://www.mongodb.org/displ ...

  2. SQL Server 的SQL基础知识

    1.N'关闭'N是指nvarchar,是将其内容关闭作为 Unicode字符常量(双字节).而没有N的 '关闭', 是将关闭作为字符常量(单字节). 平常没有加N,结果里面直接出现?. 具体如下图: ...

  3. AndroidStudio 应用(一)

    1.下载安装,用上vpn了都: 2.配置模拟器,出现问题:VT-x is disabled in the BIOS for both all CPU modes (VERR_VMX_MSR_ALL_V ...

  4. C#遍历hashtable

    foreach (DictionaryEntry de in hashTable) { System.Windows.Forms.MessageBox.Show(de.Key.ToString()); ...

  5. (转载)CentOS6下 源代码方式安装openERP7.0

    CentOS6下 源代码方式安装openERP7.0 安装背景 :CPU32 bit,CentOS 6.4版本,openERP7.0,linux shell为bash,PostgreSQL9.2 1. ...

  6. LINQ学习入门教程(一)

    LINQ 查询简介       Linq 是一跨各种数据源和数据格式的数据模型:它在查询是,始终是把它作为一种对象来操作,可以使用基本相同的编码模型查询和数据的转换XML,SQL,ADO数据等: Li ...

  7. HackerRank "Components in a graph"

    Regular Union-Find practice one. #include <cmath> #include <cstdio> #include <climits ...

  8. js常见数字处理整理

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <hea ...

  9. Oracle中in和exists的选择

    在ORACLE 11G大行其道的今天,还有很多人受早期版本的影响,记住一些既定的规则,   1.子查询结果集小,用IN   2.外表小,子查询表大,用EXISTS 摘自:http://blog.chi ...

  10. php没有开启Memcache扩展类时

    模拟PHP Memcache 类.当服务器没有开启Memcache扩展的时候.可以采用本类使用方法class_exists('Memcache') or include './Memcache.cla ...