AO创建Tin

功能:创建TIN

参数:

pFeatureClass点要素类

pFieldZ字段

pPath路径


public ITin Create_TIN(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.esriTinHardLine, ref pObj);

if (File.Exists(pPath))

{

Directory.Delete(pPath);

}

pTinEdit.SaveAs(pPath, ref pObj);

pTinEdit.Refresh();

return pTinEdit as ITin;

}

你可能感兴趣的:(AO创建Tin)