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中Cookie的用法【转】
比如建立一个名为aspcn,值为灌水小鱼的cookie HttpCookie cookie = new HttpCookie["aspcn"];cookie.Value = &qu ...
- Python报错UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position 0: ordinal not in range(128)
解决办法: 在报错的页面添加代码: import sys reload(sys) sys.setdefaultencoding('utf8')
- JS动态广告浏览
<script language="JavaScript"> function addEventSimple(obj,evt,fn){ if(obj.addEventL ...
- Linux How to add a new disk to LVM
转自:http://blog.itpub.net/7191998/viewspace-772060/ 1.check old diskspace and device listdf -halfree ...
- RGB颜色对照图
- oracle 行转列的例子
with test as(select '1' bit from dual union select '0' from dual )select replace(sys_connect_by_path ...
- nginx path_info问题解决
问题: 访问www.xxxx.com/index.php/api/xxxxxxxxx网址时,提示无法访问,找不到页面 解决: 第一次,是改了nginx.conf,不会报这个错误了,但还是没有用 loc ...
- 在VS2008环境下的C++异常处理
在写DAServer的过程中,一直在重视报文逻辑处理,却没有认认真真地去思考异常处理的问题.曾经我发现我在所有的报文处理函数中均没有考虑报文长度的问题,让我内心不由地捏了一把冷汗.我在新增的故障录波及 ...
- 黄聪:wordpress如何添加自定义文章快速编辑按钮
When working with WordPress posts and you want to quickly change the status or date of one or more p ...
- 内存修改console
#include <stdio.h> #include <windows.h> #include <winuser.h> int main() { int cur_ ...