public static void ChangeCoordinateSystem(IGeodatabaseRelease igeodatabaseRelease_0,
                                           ISpatialReference ispatialReference_0, bool bool_0)
 {
     if (ispatialReference_0 != null)
     {
         bool geoDatasetPrecision            = GeodatabaseTools.GetGeoDatasetPrecision(igeodatabaseRelease_0);
         IControlPrecision2 controlPrecision = ispatialReference_0 as IControlPrecision2;
         if (controlPrecision.IsHighPrecision != geoDatasetPrecision)
         {
             controlPrecision.IsHighPrecision = geoDatasetPrecision;
             double num;
             double num2;
             double num3;
             double num4;
             ispatialReference_0.GetDomain(out num, out num2, out num3, out num4);
             if (bool_0)
             {
                 ISpatialReferenceResolution spatialReferenceResolution =
                     ispatialReference_0 as ISpatialReferenceResolution;
                 spatialReferenceResolution.ConstructFromHorizon();
                 spatialReferenceResolution.SetDefaultXYResolution();
                 ISpatialReferenceTolerance spatialReferenceTolerance =
                     ispatialReference_0 as ISpatialReferenceTolerance;
                 spatialReferenceTolerance.SetDefaultXYTolerance();
             }
         }
     }
 }
Beispiel #2
0
        private ISpatialReference GetSpatialReference(int xyCoordinateSystem)
        {
            const bool IsHighPrecision = true;

            ISpatialReference spatialReference;

            ISpatialReferenceFactory3 spatialReferenceFactory = new SpatialReferenceEnvironmentClass();

            spatialReference = spatialReferenceFactory.CreateSpatialReference(xyCoordinateSystem);

            IControlPrecision2 controlPrecision = spatialReference as IControlPrecision2;

            controlPrecision.IsHighPrecision = IsHighPrecision;

            ISpatialReferenceResolution spatialReferenceResolution = spatialReference as ISpatialReferenceResolution;

            spatialReferenceResolution.ConstructFromHorizon();
            spatialReferenceResolution.SetDefaultXYResolution();
            spatialReferenceResolution.SetDefaultZResolution();
            spatialReferenceResolution.SetDefaultMResolution();

            ISpatialReferenceTolerance spatialReferenceTolerance = spatialReference as ISpatialReferenceTolerance;

            spatialReferenceTolerance.SetDefaultXYTolerance();
            spatialReferenceTolerance.SetDefaultZTolerance();
            spatialReferenceTolerance.SetDefaultMTolerance();

            return(spatialReference);
        }
Beispiel #3
0
        /// <summary>
        // 创建要素数据集
        /// </summary>
        /// <param name="workspace"></param>
        /// <param name="code"></param>
        /// <param name="datasetName"></param>
        /// <returns></returns>
        public IFeatureDataset CreateFeatureClass(IWorkspace workspace, int code, string datasetName)
        {
            IFeatureWorkspace featureWorkspace = (IFeatureWorkspace)workspace;
            //创建一个要素集创建一个投影
            ISpatialReferenceFactory spatialRefFactory = new SpatialReferenceEnvironmentClass();
            ISpatialReference        spatialReference  = spatialRefFactory.CreateProjectedCoordinateSystem(code);
            //确定是否支持高精度存储空间
            Boolean supportsHighPrecision            = false;
            IWorkspaceProperties workspaceProperties = (IWorkspaceProperties)workspace;
            IWorkspaceProperty   workspaceProperty   = workspaceProperties.get_Property
                                                           (esriWorkspacePropertyGroupType.esriWorkspacePropertyGroup,
                                                           (int)esriWorkspacePropertyType.esriWorkspacePropSupportsHighPrecisionStorage);

            if (workspaceProperty.IsSupported)
            {
                supportsHighPrecision = Convert.ToBoolean(workspaceProperty.PropertyValue);
            }
            //设置投影精度
            IControlPrecision2 controlPrecision = (IControlPrecision2)spatialReference;

            controlPrecision.IsHighPrecision = supportsHighPrecision;
            //设置容差
            ISpatialReferenceResolution spatialRefResolution = (ISpatialReferenceResolution)spatialReference;

            spatialRefResolution.ConstructFromHorizon();
            spatialRefResolution.SetDefaultXYResolution();
            ISpatialReferenceTolerance spatialRefTolerance = (ISpatialReferenceTolerance)spatialReference;

            spatialRefTolerance.SetDefaultXYTolerance();
            //创建要素集
            IFeatureDataset featureDataset = featureWorkspace.CreateFeatureDataset(datasetName, spatialReference);

            return(featureDataset);
        }
Beispiel #4
0
        /// <summary>
        ///  创建要素集 20110919 xisheng
        /// </summary>
        /// <param name="feaworkspace">指定工作空间</param>
        /// <param name="datasetname">指定要素集名称</param>
        /// <param name="PrjPath">空间参考</param>
        /// <returns></returns>
        private static IFeatureDataset CreateFeatureDataset(IFeatureWorkspace feaworkspace, string datasetname, string PrjPath)
        {
            try
            {
                string spatialPath = PrjPath;
                ISpatialReferenceFactory pSpaReferenceFac  = new SpatialReferenceEnvironmentClass(); //空间参考工厂
                ISpatialReference        pSpatialReference = null;                                   //用来获得空间参考
                if (File.Exists(spatialPath))
                {
                    pSpatialReference = pSpaReferenceFac.CreateESRISpatialReferenceFromPRJFile(spatialPath);
                }
                if (pSpatialReference == null)
                {
                    pSpatialReference = new UnknownCoordinateSystemClass();
                }

                //设置默认的Resolution
                ISpatialReferenceResolution pSpatiaprefRes = pSpatialReference as ISpatialReferenceResolution;
                pSpatiaprefRes.ConstructFromHorizon();//Defines the XY resolution and domain extent of this spatial reference based on the extent of its horizon
                pSpatiaprefRes.SetDefaultXYResolution();
                pSpatiaprefRes.SetDefaultZResolution();
                pSpatiaprefRes.SetDefaultMResolution();
                //设置默认的Tolerence
                ISpatialReferenceTolerance pSpatialrefTole = pSpatiaprefRes as ISpatialReferenceTolerance;
                pSpatialrefTole.SetDefaultXYTolerance();
                pSpatialrefTole.SetDefaultZTolerance();
                pSpatialrefTole.SetDefaultMTolerance();

                //创建数据集

                IFeatureDataset pFeatureDataset = null;//定义数据集用来装载要素类
                pFeatureDataset = feaworkspace.CreateFeatureDataset(datasetname, pSpatialReference);


                return(pFeatureDataset);
            }
            catch (Exception e)
            {
                //*******************************************************************
                //guozheng added
                if (ModData.SysLog != null)
                {
                    ModData.SysLog.Write(e, null, DateTime.Now);
                }
                else
                {
                    ModData.SysLog = new SysCommon.Log.clsWriteSystemFunctionLog();
                    ModData.SysLog.Write(e, null, DateTime.Now);
                }
                //********************************************************************
                return(null);
            }
        }
Beispiel #5
0
        private ISpatialReference method_0(bool bool_5)
        {
            ISpatialReference  reference = new UnknownCoordinateSystemClass();
            IControlPrecision2 precision = reference as IControlPrecision2;

            precision.IsHighPrecision = bool_5;
            ISpatialReferenceResolution resolution = reference as ISpatialReferenceResolution;

            resolution.ConstructFromHorizon();
            resolution.SetDefaultXYResolution();
            (reference as ISpatialReferenceTolerance).SetDefaultXYTolerance();
            return(reference);
        }
Beispiel #6
0
        private void method_0(ISpatialReference ispatialReference_0)
        {
            bool geoDatasetPrecision      = false;
            IGeodatabaseRelease release   = this.iworkspace_0 as IGeodatabaseRelease;
            IControlPrecision2  precision = ispatialReference_0 as IControlPrecision2;

            geoDatasetPrecision       = GeodatabaseTools.GetGeoDatasetPrecision(release);
            precision.IsHighPrecision = geoDatasetPrecision;
            ISpatialReferenceResolution resolution = ispatialReference_0 as ISpatialReferenceResolution;

            resolution.ConstructFromHorizon();
            resolution.SetDefaultXYResolution();
            (ispatialReference_0 as ISpatialReferenceTolerance).SetDefaultXYTolerance();
        }
Beispiel #7
0
        private ISpatialReference method_0(bool bool_1)
        {
            new SpatialReferenceEnvironmentClass();
            ISpatialReference   reference = new UnknownCoordinateSystemClass();
            IGeodatabaseRelease release   = this.ifeatureWorkspace_0 as IGeodatabaseRelease;
            IControlPrecision2  precision = reference as IControlPrecision2;

            bool_1 = GeodatabaseTools.GetGeoDatasetPrecision(release);
            precision.IsHighPrecision = bool_1;
            ISpatialReferenceResolution resolution = reference as ISpatialReferenceResolution;

            resolution.ConstructFromHorizon();
            resolution.SetDefaultXYResolution();
            (reference as ISpatialReferenceTolerance).SetDefaultXYTolerance();
            return(reference);
        }
        public static ISpatialReference ConstructCoordinateSystem(IGeodatabaseRelease igeodatabaseRelease_0)
        {
            bool geoDatasetPrecision = GeodatabaseTools.GetGeoDatasetPrecision(igeodatabaseRelease_0);

            ISpatialReference  spatialReference = new UnknownCoordinateSystem() as ISpatialReference;
            IControlPrecision2 controlPrecision = spatialReference as IControlPrecision2;

            controlPrecision.IsHighPrecision = geoDatasetPrecision;
            ISpatialReferenceResolution spatialReferenceResolution = spatialReference as ISpatialReferenceResolution;

            spatialReferenceResolution.ConstructFromHorizon();
            spatialReferenceResolution.SetDefaultXYResolution();
            ISpatialReferenceTolerance spatialReferenceTolerance = spatialReference as ISpatialReferenceTolerance;

            spatialReferenceTolerance.SetDefaultXYTolerance();
            return(spatialReference);
        }
Beispiel #9
0
        private IFeatureClass method_2(IDataset idataset_1, string string_2)
        {
            IFields     fields = new FieldsClass();
            IFieldsEdit edit   = (IFieldsEdit)fields;

            for (int i = 0; i < this.arrayList_0.Count; i++)
            {
                edit.AddField(this.arrayList_0[i] as IField);
            }
            IGeometryDef     def   = new GeometryDefClass();
            IGeometryDefEdit edit2 = (IGeometryDefEdit)def;

            edit2.GeometryType_2 = esriGeometryType.esriGeometryPoint;
            edit2.GridCount_2    = 1;
            edit2.set_GridSize(0, 200.0);
            edit2.AvgNumPoints_2 = 1;
            edit2.HasM_2         = false;
            edit2.HasZ_2         = false;
            ISpatialReference           reference  = new UnknownCoordinateSystemClass();
            ISpatialReferenceResolution resolution = reference as ISpatialReferenceResolution;

            resolution.ConstructFromHorizon();
            resolution.SetDefaultXYResolution();
            (reference as ISpatialReferenceTolerance).SetDefaultXYTolerance();
            edit2.SpatialReference_2 = reference;
            IField     field = new FieldClass();
            IFieldEdit edit3 = (IFieldEdit)field;

            edit3.Name_2      = "OBJECTID";
            edit3.AliasName_2 = "OBJECTID";
            edit3.Type_2      = esriFieldType.esriFieldTypeOID;
            edit.AddField(field);
            IField     field2 = new FieldClass();
            IFieldEdit edit4  = (IFieldEdit)field2;

            edit4.Name_2        = "SHAPE";
            edit4.AliasName_2   = "SHAPE";
            edit4.Type_2        = esriFieldType.esriFieldTypeGeometry;
            edit4.GeometryDef_2 = def;
            edit.AddField(field2);
            return(this.CreateFeatureClass(idataset_1, string_2, new UnknownCoordinateSystemClass(),
                                           esriFeatureType.esriFTSimple, esriGeometryType.esriGeometryPoint, fields, null, null, null));
        }
Beispiel #10
0
        /// <summary>
        /// 创建几何空间参考
        /// </summary>
        /// <param name="LoadPath">空间参考文件</param>
        /// <param name="eError"></param>
        /// <returns></returns>
        public ISpatialReference GetSpatialRef(string LoadPath, out Exception eError)
        {
            eError = null;
            try
            {
                ISpatialReference        pSR            = null;
                ISpatialReferenceFactory pSpatialRefFac = new SpatialReferenceEnvironmentClass();

                if (!File.Exists(LoadPath))
                {
                    //eError = new Exception("空间参考文件不存在!");
                    return(null);
                }
                pSR = pSpatialRefFac.CreateESRISpatialReferenceFromPRJFile(LoadPath);

                ISpatialReferenceResolution pSRR = pSR as ISpatialReferenceResolution;
                ISpatialReferenceTolerance  pSRT = (ISpatialReferenceTolerance)pSR;
                IControlPrecision2          pSpatialPrecision = (IControlPrecision2)pSR;

                pSRR.ConstructFromHorizon();//Defines the XY resolution and domain extent of this spatial reference based on the extent of its horizon
                pSRR.SetDefaultXYResolution();
                pSRT.SetDefaultXYTolerance();
                return(pSR);
            }
            catch (Exception ex)
            {
                //*******************************************************************
                //guozheng added
                if (ModData.SysLog != null)
                {
                    ModData.SysLog.Write(ex, null, DateTime.Now);
                }
                else
                {
                    ModData.SysLog = new SysCommon.Log.clsWriteSystemFunctionLog();
                    ModData.SysLog.Write(ex, null, DateTime.Now);
                }
                //********************************************************************

                eError = ex;
                return(null);
            }
        }
Beispiel #11
0
 private static void ChangeCoordinateSystem(IGeodatabaseRelease igeodatabaseRelease_0,
                                            ISpatialReference ispatialReference_0, bool bool_0)
 {
     if (ispatialReference_0 != null)
     {
         bool geoDatasetPrecision = GeodatabaseTools.GetGeoDatasetPrecision(igeodatabaseRelease_0);
         IControlPrecision2 ispatialReference0 = ispatialReference_0 as IControlPrecision2;
         if (ispatialReference0.IsHighPrecision != geoDatasetPrecision)
         {
             ispatialReference0.IsHighPrecision = geoDatasetPrecision;
             if (bool_0)
             {
                 ISpatialReferenceResolution spatialReferenceResolution =
                     ispatialReference_0 as ISpatialReferenceResolution;
                 spatialReferenceResolution.ConstructFromHorizon();
                 spatialReferenceResolution.SetDefaultXYResolution();
                 (ispatialReference_0 as ISpatialReferenceTolerance).SetDefaultXYTolerance();
             }
         }
     }
 }
Beispiel #12
0
        /// <summary>
        /// shape图层入库
        /// </summary>
        /// <param name="sourceworkspace"></param>
        /// <param name="targetworkspace"></param>
        /// <param name="nameOfsourceFeatureClass"></param>
        /// <param name="nameOftargetFeatureClass"></param>
        /// <returns></returns>
        public IFeatureClass ShapeFileIntoGDB(IWorkspace sourceworkspace, IWorkspace targetworkspace,
                                              string nameOfsourceFeatureClass, string nameOftargetFeatureClass)
        {
            try
            {
                //创建源工作空间
                IDataset       sourceWorkspaceDataset = (IDataset)sourceworkspace;
                IWorkspaceName sourceWorkspaceName    = (IWorkspaceName)sourceWorkspaceDataset.FullName;

                //创建源数据集
                IFeatureClassName sourceFeatureClassName = new FeatureClassNameClass();
                IDatasetName      sourceDatasetName      = (IDatasetName)sourceFeatureClassName;
                sourceDatasetName.WorkspaceName = sourceWorkspaceName;
                sourceDatasetName.Name          = nameOfsourceFeatureClass;

                //创建目标工作空间
                IDataset       targetWorkspaceDataset = (IDataset)targetworkspace;
                IWorkspaceName targetWorkspaceName    = (IWorkspaceName)targetWorkspaceDataset.FullName;

                //创建目标数据集
                IFeatureClassName targetFeatureClassName = new FeatureClassNameClass();
                IDatasetName      targetDatasetName      = (IDatasetName)targetFeatureClassName;
                targetDatasetName.WorkspaceName = targetWorkspaceName;
                targetDatasetName.Name          = nameOftargetFeatureClass;

                //源数据集的字段集
                IName         sourceName         = (IName)sourceFeatureClassName;
                IFeatureClass sourceFeatureClass = (IFeatureClass)sourceName.Open();

                //验证字段
                IFieldChecker   fieldChecker = new FieldCheckerClass();
                IFields         targetFeatureClassFields;
                IFields         sourceFeatureClassFields = sourceFeatureClass.Fields;
                IEnumFieldError enumFieldError;

                //设置验证的对象
                fieldChecker.InputWorkspace    = sourceworkspace;
                fieldChecker.ValidateWorkspace = targetworkspace;
                fieldChecker.Validate(sourceFeatureClassFields, out enumFieldError, out targetFeatureClassFields);

                //找到空间对象字段
                IField geometryField;
                for (int i = 0; i < targetFeatureClassFields.FieldCount; i++)
                {
                    if (targetFeatureClassFields.get_Field(i).Type == esriFieldType.esriFieldTypeGeometry)
                    {
                        geometryField = targetFeatureClassFields.get_Field(i);

                        //得到空间字段的定义
                        IGeometryDef geometryDef = geometryField.GeometryDef;

                        //得到空间字段的索引
                        IGeometryDefEdit targetFCGeometryDefEdit = (IGeometryDefEdit)geometryDef;
                        targetFCGeometryDefEdit.GridCount_2 = 1;
                        targetFCGeometryDefEdit.set_GridSize(0, 0);
                        //targetFCGeometryDefEdit.SpatialReference_2 = geometryField.GeometryDef.SpatialReference;

                        ISpatialReferenceFactory spatialReferenceFactory = new SpatialReferenceEnvironmentClass();
                        ISpatialReference        spatialReference        = DataEditCommon.g_pMap.SpatialReference;
                        //spatialReferenceFactory.CreateProjectedCoordinateSystem((int)esriSRProjCSType.esriSRProjCS_NAD1983UTM_20N);
                        ISpatialReferenceResolution spatialReferenceResolution = (ISpatialReferenceResolution)spatialReference;
                        spatialReferenceResolution.ConstructFromHorizon();
                        spatialReferenceResolution.SetDefaultXYResolution();
                        spatialReferenceResolution.SetDefaultZResolution();
                        ISpatialReferenceTolerance spatialReferenceTolerance = (ISpatialReferenceTolerance)spatialReference;
                        spatialReferenceTolerance.SetMinimumXYTolerance();
                        spatialReferenceTolerance.SetMinimumZTolerance();

                        double XMin, XMax, YMin, YMax, ZMin, ZMax, MinXYTolerance, MinZTolerance;
                        XMin = 4054.3603997438;
                        XMax = 78088.6926632544;
                        YMin = 14424.8510028409;
                        YMax = 59609.4812606697;
                        ZMin = 30330.1483519995;
                        ZMax = 38389.3283520005;
                        //spatialReference.SetDomain(XMin, XMax, YMin, YMax);
                        //spatialReference.SetZDomain(ZMin, ZMax);

                        MinXYTolerance = 0.000000000008219;
                        MinZTolerance  = 0.000000000007629;
                        //spatialReferenceTolerance.SetMinimumZTolerance( MinXYTolerance);

                        //spatialReference.GetDomain(out XMin, out XMax, out YMin, out YMax);
                        //spatialReference.GetZDomain(out ZMin, out ZMax);


                        targetFCGeometryDefEdit.SpatialReference_2 = spatialReference;


                        //开始导入
                        IQueryFilter queryFilter = new QueryFilterClass();
                        queryFilter.WhereClause = "";

                        //导入所有的输入对象
                        IFeatureDataConverter featureDataConverter = new FeatureDataConverterClass();
                        IEnumInvalidObject    enumInvalidObject    = featureDataConverter.ConvertFeatureClass(sourceFeatureClassName,
                                                                                                              queryFilter, null, targetFeatureClassName, geometryDef, targetFeatureClassFields, "", 1000, 0);
                        break;
                    }
                }

                //导入后数据集的字段集
                IName         targetName         = (IName)targetFeatureClassName;
                IFeatureClass targetFeatureClass = (IFeatureClass)targetName.Open();

                return(targetFeatureClass);
            }
            catch (Exception ex)
            {
                return(null);
            }
        }
        /// <summary>
        /// 创建一个要素集
        /// </summary>
        private void CreateFeatureClass()
        {
            string path    = txt_org.Text;
            string PRJFile = txt_prj.Text;
            AccessWorkspaceFactory pAccessFact = new AccessWorkspaceFactoryClass();

            IFeatureWorkspace         pFeatureWorkspace = pAccessFact.OpenFromFile(path, 0) as IFeatureWorkspace;
            ISpatialReferenceFactory2 Isp = new SpatialReferenceEnvironmentClass();                   //创建一个空间参照的接口空间

            ISpatialReference           spatial = Isp.CreateESRISpatialReferenceFromPRJFile(PRJFile); //利用要素类的PRJ文件参照
            ISpatialReferenceResolution pSRR    = (ISpatialReferenceResolution)spatial;               //设置分辨率

            pSRR.SetDefaultXYResolution();                                                            //设置默认XY值

            ISpatialReferenceTolerance pSRT = (ISpatialReferenceTolerance)spatial;

            pSRT.SetDefaultXYTolerance();//设置默认容差值
            IWorkspace space = pFeatureWorkspace as IWorkspace;

            IEnumDatasetName Dataset_name = space.get_DatasetNames(esriDatasetType.esriDTAny);//得到有多少个要素集合名字

            Dataset_name.Reset();
            IDatasetName Name_set = Dataset_name.Next();

            while (Name_set != null)
            {
                if (Name_set.Name == "Geo_Topo_ice")
                {
                    SysCommon.Error.ErrorHandle.ShowFrmErrorHandle("提示", "数据集已存在,不用创建!");
                    this.Close();//如果要创建的数据集已存在,就返回,并关闭窗体
                    return;
                }
                Name_set = Dataset_name.Next();
            }
            IFeatureDataset pfd = pFeatureWorkspace.CreateFeatureDataset("Geo_Topo_ice", spatial); //创建一个要素集

            IEnumDataset dst = space.get_Datasets(esriDatasetType.esriDTAny);                      //得到所有的要素类的一个集合

            dst.Reset();
            IDataset det = dst.Next();

            _AppHk.OperatorTips = "开始创建对应的要素类...";
            while (det != null)
            {
                #region 给要素集创建空的要素类
                if (det.Type == esriDatasetType.esriDTFeatureClass)                       //判定是不是要素类
                {
                    string org_name = det.Name;                                           //原始的名字
                    _AppHk.OperatorTips = "开始创建" + org_name + "要素类...";
                    IFeatureClass f_class = pFeatureWorkspace.OpenFeatureClass(org_name); //打开源要素类
                    det.Rename(org_name + "_t");                                          //把源要素类进行重命名
                    IFields     Fieldset = new FieldsClass();                             //建立一个字段集
                    IFieldsEdit sField   = Fieldset as IFieldsEdit;                       //字段集
                    if (f_class.FeatureType != esriFeatureType.esriFTAnnotation)
                    {
                        //shape
                        IGeometryDefEdit d_edit;                       //定义一个用来接收要素类的SHAPE类型
                        d_edit = new GeometryDefClass();               //实例一个操作类
                        d_edit.GeometryType_2     = f_class.ShapeType; //将源要素类的SHAPE赋值给我们要创建的几何类型
                        d_edit.SpatialReference_2 = spatial;           //空间参考

                        string OID   = f_class.OIDFieldName;           //ODI名字
                        string SHAPE = f_class.ShapeFieldName;         //SHAPE名字

                        //IFields Fieldset = new FieldsClass();//建立一个字段集
                        //IFieldsEdit sField = Fieldset as IFieldsEdit;//字段集


                        //创建要素类里的字段
                        int count = f_class.Fields.FieldCount;//确定有多少个字段

                        #region 创建字段
                        for (int n = 0; n < count; n++)
                        {
                            IField f_ield = f_class.Fields.get_Field(n);

                            IFieldEdit fieldEdit = f_ield as IFieldEdit;
                            //Annotate
                            if (f_ield.Name == SHAPE)
                            {
                                //shape field
                                fieldEdit.Type_2        = esriFieldType.esriFieldTypeGeometry; //确定字段的类型
                                fieldEdit.GeometryDef_2 = d_edit;                              //把几何类型赋值给它
                                fieldEdit.Name_2        = SHAPE;                               //把几何类型SHPAE的名字赋值给它
                                f_ield = fieldEdit as IField;
                                sField.AddField(f_ield);                                       //加入要素集
                            }
                            else if (f_ield.Name == OID)
                            {
                                //oid
                                fieldEdit.Type_2 = esriFieldType.esriFieldTypeOID; //OID标识字段
                                fieldEdit.Name_2 = OID;                            //OID的名字
                                f_ield           = fieldEdit as IField;
                                sField.AddField(f_ield);                           //加入OID
                            }
                            else
                            {
                                //一般字段
                                fieldEdit.Name_2 = f_ield.Name;
                                fieldEdit.Type_2 = f_ield.Type;//字段的类型

                                f_ield = fieldEdit as IField;
                                sField.AddField(f_ield);
                            }
                        }
                        #endregion

                        Fieldset = sField as IFields;                                                                             //将可编辑的字段集转成一般字段集
                        pfd.CreateFeatureClass(org_name, Fieldset, f_class.CLSID, null, esriFeatureType.esriFTSimple, SHAPE, ""); //给要素集中创建要素类
                    }
                    else
                    {
                        createAnnoFeatureClass(org_name, pfd, pfd.Workspace as IFeatureWorkspace, sField, 2000);
                    }

                    det = dst.Next();//重新遍历下一个
                }
                else
                {
                    det = dst.Next();//重新遍历下一个
                }
                #endregion
            }
            _AppHk.OperatorTips = "要素集合创建成功!";
            GetValue(pFeatureWorkspace);//当对应的要素类建立好后,就开始给空要素类赋值
            SysCommon.Error.ErrorHandle.ShowFrmErrorHandle("提示", "数据处理完成!");
            this.Close();
        }