public static List <IRasterLayer> pRstLayers = new List <IRasterLayer>(); //存储栅格数据的图层 #endregion #region 地理数据库和连接 /// <summary> /// 创建企业地理数据库 /// </summary> /// <param name="DB_platform">数据库类型</param> /// <param name="instance">地址</param> /// <param name="DB_Name">数据库名</param> /// <param name="DB_admin">数据库用户名</param> /// <param name="DB_pwd">数据库密码</param> /// <param name="GDB_admin">地理数据库用户名</param> /// <param name="GDB_pwd">地理数据库密码</param> /// <param name="auth_path">许可路径</param> /// public void CreateEnterpriseDB(string DB_platform, string instance, string DB_name, string DB_admin, string DB_pwd, string GDB_admin, string GDB_pwd, string auth_path) { Geoprocessor gp = new Geoprocessor(); gp.OverwriteOutput = true; CreateEnterpriseGeodatabase ceGDB = new CreateEnterpriseGeodatabase(); ceGDB.database_platform = DB_platform; ceGDB.instance_name = instance; ceGDB.database_name = DB_name; ceGDB.database_admin = DB_admin; ceGDB.database_admin_password = DB_pwd; ceGDB.gdb_admin_name = GDB_admin; ceGDB.gdb_admin_password = GDB_pwd; ceGDB.authorization_file = auth_path; gp.Execute(ceGDB, null); }
public string createSDE(string dbtype, string instance, string db_admin, string db_admin_password, string sde_admin, string sde_admin_password, string tablespacename, string authorfilepath) { CreateEnterpriseGeodatabase createSDE = new CreateEnterpriseGeodatabase(); createSDE.database_platform = dbtype; createSDE.instance_name = instance; createSDE.database_admin = db_admin; createSDE.database_admin_password = db_admin_password; createSDE.gdb_admin_name = sde_admin; createSDE.gdb_admin_password = sde_admin_password; createSDE.tablespace_name = tablespacename; createSDE.authorization_file = authorfilepath; Geoprocessor gp = new Geoprocessor(); //设置参数 //执行Intersect工具 string ans = RunTool(gp, createSDE, null); return(ans); }