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

 IFeatureClass featureClass = this.pLayer.FeatureClass;
string shapeFieldName = featureClass.ShapeFieldName;
if (featureClass.Fields.get_Field(featureClass.FindField(shapeFieldName)).GeometryDef.HasZ)
{
this.hasZ = true;
}

若有为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;
}
05-04 05:52