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,这些接口 ...
随机推荐
- Java的大数操作分为BigInteger和BigDecimal
Java的大数操作分为BigInteger和BigDecimal,但这两给类是分开使用的,有时候在编程的时候显得略微繁琐,现在编写了一个将二者合二为一的大数操作类. 大数操作类代码如下: 1 pack ...
- 延迟加载、异步加载js
defer为true:延迟加载脚本,在文档完成解析完成开始执行,并且在DOMContentLoaded事件之前执行完成. async(HTML5新增的属性)为true:异步加载脚本,下载完毕后再执行, ...
- each和$(this)配合循环_siblings选取同级不同类型元素
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/stri ...
- DBA常用SQL之数据库基础信息
第一部分: 1. 查看oracle最大连接数 sql>show parameter processes #最大连接数 2. 修改最大连接数 sql>alter system set pro ...
- beeframework开发笔记1
1.商品页弹出规格去掉(null) wzmzy/shop/model/extensions/GOOD_SPEC_VALUE+TagList.m 2.
- 访问本机的WEB API 报400错误
当时用的IP是127.0.0.1 报400错误,换成 localhost 后正常.
- Oracle数据库中实现mysql数据库中auto-increment功能
在Mysql数据库中,想要实现一条数据的自增一功能(即插入此数据时填写null即可,系统自动+1),可直接在所在列使用语句auto-increment. id int primary key auto ...
- windows下制作u盘启动的工具
推荐rufus,快捷方便
- 从IT匹配业务如何走向IT引领业务
http://mp.weixin.qq.com/s?__biz=MjM5Njk2Mzg0MQ==&mid=200105892&idx=1&sn=cd9c155d09e8b975 ...
- Maven使用-- 编写POM
就像Make的Makefile.Ant的build.xml一样,Maven项目的核心是pom.xml. POM(Project Object Model,项目对象模型)定义了项目的基本信息,用 ...