修改Geometry字段是不行的,直接删除重建,可以把Geometry临时存在别处,然后。。。不懂的
fc = WorkSpaceServices.Instance().CurEditFeatureClass.OpenFeatureClass();
if (fc.GetFields().IndexOf("Geometry") != -1)
{
fc.DeleteField("Geometry");
}
IFieldInfo fieldInfo = new FieldInfo();
IGeometryDef geometryDef = new GeometryDef();
geometryDef.GeometryColumnType = gviGeometryColumnType.gviGeometryColumnModelPoint;
geometryDef.HasId = true;
geometryDef.HasZ = true;
geometryDef.HasM = true;
fieldInfo.GeometryDef = geometryDef;
fieldInfo.Name = "Geometry";
fc.AddField(fieldInfo);