判断IFeatureClass图形是否含有Z值信息,若有为IPoint赋Z值

判断IFeatureClass图形是否含有Z值信息

1 IFeatureClass featureClass = this.pLayer.FeatureClass;
2  string shapeFieldName = featureClass.ShapeFieldName;
3  if (featureClass.Fields.get_Field(featureClass.FindField(shapeFieldName)).GeometryDef.HasZ)
4 {
5         this.hasZ = true;
6 }

 

若有为IPoint赋Z值:

IPoint point = new PointClass();
point.X = num;
point.Y = num2;
if (this.hasZ)
{
       IZAware aware = point as IZAware;
       aware.ZAware = true;
       double num3 = Convert.ToDouble(this.Z_numericUpDown.Text);
       point.Z = num3;
}

 

posted @ 2013-08-28 13:29  寻梦放歌  阅读(517)  评论(0编辑  收藏  举报