ARCGIS常用几种本地数据AE初始化

时间:2022-04-17 20:11:18

1.Personal GDB

新建一个在E盘的名为test的mdb:
IWorkspaceFactory workspaceFactory = new AccessWorkspaceFactoryClass();
 workspaceFactory.Create("E:\\", "TEST", null, 0);
2.Filegdb
初始化一个在E盘名为TEST2的Filegdb
            ESRI.ArcGIS.Geoprocessor.Geoprocessor gp = new ESRI.ArcGIS.Geoprocessor.Geoprocessor();//实例化一个项
            gp.OverwriteOutput = true;
            CreateFileGDB gdb = new CreateFileGDB();//实例化一个FileGDB
            string Fdir = "E:\\TEST2";
            gdb.out_folder_path = System.IO.Path.GetDirectoryName(Fdir);
            gdb.out_name = System.IO.Path.GetFileName(Fdir);
            gp.Execute(gdb, null);
 
3.shapefile
初始化一个在E盘名为TEST3的shapefile
            ESRI.ArcGIS.Geoprocessor.Geoprocessor gp = new ESRI.ArcGIS.Geoprocessor.Geoprocessor();//实例化一个项
            gp.OverwriteOutput = true;
            CreateFeatureclass feaCls = new CreateFeatureclass();//实例化一个
            feaCls.out_path = "E:\\";
            feaCls.out_name = "test3";
            gp.Execute(feaCls, null);