List<IPoint> to IPointCollection to IPolygon
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的更多相关文章
- 【ESRI论坛6周年征文】ArcEngine注记(Anno/ Label/Element等)处理专题 -入门篇
原发表于ESRI中国社区,转过来.我的社区帐号:jhlong http://bbs.esrichina-bj.cn/ESRI/viewthread.php?tid=122097 ----------- ...
- 创建面注记PolygonElement
1.根据4点创建一个面 /// <summary> /// 根据4个点创建图形,点序要顺时针 /// </summary> /// <param name="p ...
- AE指定字段转成注记
转自原文 ae指定字段转成注记 ArcMap中有一个功能是Label Features,就是可以将图层内指定字段值显示以Label形式显示在主窗口上,在Label Features后,用右键点击图层, ...
- IPoilygon转IPoint
private void 河流面转点ToolStripMenuItem_Click(object sender, EventArgs e) { ESRI.ArcGIS.Geodatabase.IWor ...
- IPointCollection转IPolyline
IPointCollection转线IPolyline: IPolyline pl = new PolylineClass(); IPointCollection ptc = pl as IPoint ...
- 找个输入IPoint在某个FeatureClass上距离最近的要素
/// <summary> /// 得到输入点在输入图层上的最近点 /// </summary> /// <param name="randomPoints ...
- IPoint从自定义的投影坐标系转换到自定义的地理坐标系
IPoint pointStart = new PointClass(); pointStart = xyPolyline.FromPoint; ISpatialReferenceFactory pS ...
- 判断IFeatureClass图形是否含有Z值信息,若有为IPoint赋Z值
判断IFeatureClass图形是否含有Z值信息 IFeatureClass featureClass = this.pLayer.FeatureClass; string shapeFieldNa ...
- IPointCollection,ISegmentCollection和IGeometryCollection
Engine 提供了三个主要的几何图形集合接口用于对几何对象的操作,分别是 IPointCollection,ISegmentCollection 和 IGeometryCollection,这些接口 ...
随机推荐
- python selenium下载电子书
妹纸推荐书籍<御伽草纸>,网上找了很久都找不到下载,估计是被Amazon版权了,但是在网易云阅读看到有书,所以就写个代码下载下来. 由于网易云阅读是js加载,用requests或者下载ht ...
- [Android设计模式]Android退出应用程序终极方法
如何干净彻底地退出Android应用程序,是很多开发者的心头痒.如何干净地关闭所有已打开的Activity? 如何关闭指定的Activity? 如何关闭一类Activity? 这里,我们提出一种通过实 ...
- 控制台程序实现利用CRM组织服务和SqlConnection对数据库中数据的增删改查操作
一.首先新建一个控制台程序.命名为TestCol. 二.打开App.config在里面加入,数据库和CRM连接字符串 <connectionStrings> <add name=&q ...
- Oracle监听启动失败问题
1. C:\Users\10188535.ZTE>lsnrctl start LISTENER LSNRCTL for 32-bit Windows: Version 11.2.0.1.0 - ...
- CCS float vs clear
有人已经写过了.(*^__^*) 嘻嘻…… 为啥我不能写, ( ‵o′)凸 float 首先,HTML的布局是流布局.其元素是分为行内元素和块级元素的. 所谓行内元素就是接着写不会发生换行的元素如&l ...
- 【python】浅谈encode和decode
对于encode和decode,笔者也是根据自己的理解,有不对的地方还请多多指点. 编码的理解: 1.编码:utf-8,utf-16,gbk,gb2312,gb18030等,编码为了便于理解,可以把它 ...
- 水晶报表连接Oracle做数据报表笔记
首先,新建一个水晶报表的文件,这个时候要给这个报表文件绑定一个oracle数据源, 选择右侧菜单的这个东西,选择“数据库专家”,打开之后是这么一个界面: 选择建立新连接: 这个地方最关键,也是我为什么 ...
- 折腾Ipython
1. 用easy_install安装吧 [root@host python]# easy_install IPython Searching for IPython Reading https://p ...
- gcc/g++ 静态动态库 混链接.
我的环境: centos6 x64. gcc4.4.7 在使用gcc/g++ 编译程序时我们希望指向一些库是使用静态的链接方式. 另外的一些是动态的方式. 我以boost 为例. 如果我们要使用静态库 ...
- 文件Copy和文件夹Copy
文件Copy和文件夹Copy using System.Collections.Generic; using System.Linq; using System.Text; using System. ...