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,这些接口 ...
随机推荐
- asp.net中HTML代码编码、解码与页面的重定向
http://www.cnblogs.com/yjss/articles/2005894.html 1.编码(输出的字符串中包含HTML代码) Response.Write(Server.HtmlEn ...
- OpenJudge计算概论-能被3,5,7整除的数
/*===================================== 能被3,5,7整除的数 总时间限制: 1000ms 内存限制: 65536kB 描述 输入一个整数,判断它能否被3,5, ...
- 【转载】onclick与onCommand的区别
这两个事件没有本质区别,都是点击执行一个事件.不同在于传递的参数不一 样,OnClick (object sender, EventArgs e),OnCommand (object sender, ...
- xml学习笔记一(概述)
XML 被设计用来传输和存储数据. HTML 被设计用来显示数据. 什么是 XML? XML 指可扩展标记语言(EXtensible Markup Language) XML 是一种标记语言,很类似 ...
- 在Eclipse中使用JUnit4进行单元测试
在Eclipse中使用JUnit4进行单元测试(初级篇) 在Eclipse中使用JUnit4进行单元测试(中级篇) 在Eclipse中使用JUnit4进行单元测试(高级篇)
- Nginx出现413 Request Entity Too Large错误解决方法
Nginx出现的413 Request Entity Too Large错误,这个错误一般在上传文件的时候出现,打开nginx主配置文件nginx.conf,找到http{}段,添加 解决方法就是 打 ...
- String 深浅拷贝的测试---有待继续测试
public class TestString { void test1() { // TODO Auto-generated method stub String str = new String( ...
- samba配置只读共享
编辑smb.conf 1.在[global]中 找到 security = 将其改为 security = share 2. 在文件中加入自定义的共享目录 [attachment] path=/dat ...
- JS中exec函数与match函数的区别与联系
总结: 正则规则的声明,两种方法: exec是RegExp类的匹配方法 match是字符串类的匹配方法 var reg = /aaa/g; var reg = new RegExp("aaa ...
- 55. Jump Game
Given an array of non-negative integers, you are initially positioned at the first index of the arra ...