There are 100000 points,I use them to create a feature,this feature include five fields,they are X field,Y field,Z field,and id number,than convert the point feature to tin,but i cant't find the Z field?
IGeometryDef pGeomDef = new GeometryDefClass();
IGeometryDefEdit pGeomDefEdit = new GeometryDefClass();
pGeomDefEdit = (IGeometryDefEdit)pGeomDef;
pGeomDefEdit.GeometryType_2 = esriGeometryType.esriGeometryPoint;
pGeomDefEdit.AvgNumPoints_2 = 5;/////////////////
pGeomDefEdit.GridCount_2 = 2;
// pGeomDefEdit.SpatialReference_2 = (ISpatialReference)new UnknownCoordinateSystem();
pGeomDefEdit.SpatialReference_2 = (ISpatialReference)pSpatialReference;
pGeomDefEdit.HasM_2 = false;
pGeomDefEdit.HasZ_2 = false;
pFieldEdit.GeometryDef_2 = pGeomDef;
pFiledsEdit.AddField(pField);
pFields = (IFields)pFiledsEdit;
// IFeatureClass pFeatureClass;//
pFeatureClass = pFeatWks.CreateFeatureClass("MyShape", pFields, null, null, esriFeatureType.esriFTSimple, "Shape", "");
IField pfield1 = new FieldClass();
IFieldEdit pfieldEdit1 = new FieldClass();
pfieldEdit1.Name_2 = "X";///
pfieldEdit1.Type_2 = esriFieldType.esriFieldTypeString;
pfield1 = (IField)pfieldEdit1;
pFeatureClass.AddField(pfield1);
..............................
for (int i = 0; i < table.Rows.Count; i++)
{
double pointX, pointY, pointZ, pointM;
pointX = Convert.ToDouble(table.Rows[1]);
pointY = Convert.ToDouble(table.Rows[2]);
pointZ = Convert.ToDouble(table.Rows[3]);
pointM = Convert.ToDouble(table.Rows[4]);
point = new PointClass();
//IZAware pZAware = (IZAware)point;
//pZAware.ZAware = true;
//IMAware pMAware = (IMAware)point;
//pMAware.MAware = true;
point.X = pointX;
point.Y = pointY;
featureBuffer = pFeatureClass.CreateFeatureBuffer();
featureBuffer.set_Value(featureBuffer.Fields.FindField("X"), pointX);
.....................
}
anyone know why i can't find the Z field???