GIS大奔

enjoyGIS

获取Multipatch图层中模型的底面图形和模型的高度

获取Multipatch图层中模型的底面图形和模型的高度

 

1、获取Multipatch图层

 

IFeatureClass pFeatureClass =pFeatureWorkspace.OpenFeatureClass(layername);

 

2、获取模型数据要素

 

IFeatureCursor pFeatureCursor =pFeatureClass.Search(null,false);

 

3、获取模型要素并获取底面

(通过模型要素的Envelope和模型要素的Geometry进行相交操作)

IFeature pFeature =pFeatureCursor.NextFeature();

IGeometry pGeometry = null;

 

pGeometry = null;
pGeometry = pFeature.ShapeCopy;

pMultiPatch = pGeometry asIMultiPatch;

 

pEnvelope = null;

pEnvelope = pMultiPatch.Envelope;

 

pTopologicalOperator = null;

pTopologicalOperator = pGeometry asITopologicalOperator;

pNewGeometry = pTopologicalOperator.Intersect(pEnvelope, esriGeometryDimension.esriGeometry2Dimension);

 

4、获取最大和最小高程

 

IZCollection pZCollection = null;

pZCollection = pMultiPatch asIZCollection;

               

double zmax =pZCollection.ZMax;

double zmin =pZCollection.ZMin;

double high = zmax - zmin;

阅读更多
文章标签: ArcGIS c# esri
个人分类: 本地开发
上一篇AE+C#将E00数据导入到ArcSDE中去
下一篇AE+C#控制影像数据的清晰度和高程数据的平滑度
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭