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,这些接口 ...
随机推荐
- android 旋转手机的时候,如何忽略onCreate再次被系统调用?
实现一个程序,主要是不想在手机横竖屏的时候重新onCreate,所以在配置文件中增加了配置选项: android:configChanges="orientation|keyboardHid ...
- Android中使用WebView, WebChromeClient和WebViewClient加载网页 (能够执行js)
Android中使用WebView, WebChromeClient和WebViewClient加载网页 在android应用中,有时要加载一个网页,如果能配上一个进度条就更好了,而android ...
- 关于android中EditText边框的问题 下划线
方法1 将edittext的style设置成?android:attr/textViewStyle 取消掉默认的样式,在设置background为@null 接下来就是一个空空的edittext了, ...
- Amoeba:开源的分布式数据库Porxy解决方案
http://www.biaodianfu.com/amoeba.html 什么是Amoeba? Amoeba(变形虫)项目,该开源框架于2008年 开始发布一款 Amoeba for Mysql软件 ...
- selenium+python自动化之环境安装
一.Python安装 1.操作系统:win7 64位系统 2.下载Python安装包,选择2.7版本和3.6版本都可以(最好安装2.7版本稳定)官网下载地址:https://www.python.or ...
- MyBatis SQL xml处理小于号与大于号
MyBatis SQL xml处理小于号与大于号 当我们需要通过xml格式处理sql语句时,经常会用到< ,<=,>,>=等符号,但是很容易引起xml格式的错误,这样会导致后台 ...
- Redis容灾部署(哨兵Sentinel)
Redis容灾部署(哨兵Sentinel) 哨兵的作用 1. 监控:监控主从是否正常2. 通知:出现问题时,可以通知相关人员3. 故障迁移:自动主从切换4. 统一的配置管理:连接者询问sentinel ...
- VirtualBox 下USB 设备加载的步骤及无法加载的解决办法
1. 将u盘插入电脑,在windows能够识别后,进入VirtualBox的选定要加载的虚拟机,选择设置——>选择usb设备项 2. 选择右边的第一或者是第二个图标,增加一个新的筛选器,第一个图 ...
- android 开源项目一览
直接拿来用!最火的Android开源项目(一) http://www.csdn.net/article/2013-05-03/2815127-Android-open-source-projects ...
- 【转】c#实现文件下载
需求:点击SAVE,去ajax去后台下载文件,完成后出现保存对话框,然后直接下载. 解决方案:下载完成后用JS转到向到另一个页面,在这页面Page_Load里用C#Response对象直接下载. 下载 ...