ArcGIS Engine 10 开发手册(8-21) Tin表面分析-创建Tin
发布时间: 2018-01-29
所属分类: ArcGIS Engine 10 开发手册
创建Tin
private void 创建TinToolStripMenuItem_Click (object sender, EventArgs e)
{
IFeatureClass pFeatureClass = GetFeatureClass (@"E:\arcgis\Engine\IDW数据", "ft东20100321");
IField pField = pFeatureClass.Fields.get_Field (pFeatureClass.FindField ("H"));
ITin pTin = CreateTin (pFeatureClass, pField, @"E:\arcgis\Engine\IDW数据\TinTest");
ITinLayer pTinLayer = new TinLayerClass ();
pTinLayer.Dataset = pTin;
axMapControl1.Map.AddLayer (pTinLayer as ILayer);
}
/// <summary>
/// 创建Tin
/// </summary>
/// <param name="pFeatureClass"></param>
/// <param name="pField"></param>
/// <param name="pPath"></param>
/// <returns></returns>
public ITin CreateTin (IFeatureClass pFeatureClass, IField pField, string pPath) {
IGeoDataset pGeoDataset = pFeatureClass as IGeoDataset;
ITinEdit pTinEdit = new TinClass ();
pTinEdit.InitNew (pGeoDataset.Extent);
object pObj = Type.Missing;
pTinEdit.AddFromFeatureClass (pFeatureClass, null, pField, null, esriTinSurfaceType.esriTinMassPoint, ref pObj);
pTinEdit.SaveAs (pPath, ref pObj);
pTinEdit.Refresh ();
return pTinEdit as ITin;
}
运行结果
ArcGIS Engine 10 开发手册全集
ArcGIS Engine 10 开发手册全集: ArcGIS Engine 10 开发手册
相关阅读
声明
1.本文所分享的所有需要用户下载使用的内容(包括但不限于软件、数据、图片)来自于网络或者麻辣GIS粉丝自行分享,版权归该下载资源的合法拥有者所有,如有侵权请第一时间联系本站删除。
2.下载内容仅限个人学习使用,请切勿用作商用等其他用途,否则后果自负。
手机阅读
公众号关注
知识星球
手机阅读
最新GIS干货
私享圈子