资源简介
实现了类型ArcCatalog的部分功能 包括sde连接树状列表、新建要素数据集、新建要素类 上传shp文件等

代码片段和文件信息
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ESRI.ArcGIS.Geodatabase;
using ESRI.ArcGIS.esriSystem;
using System.Windows.Forms;
namespace AE_Test
{
class CDatabaseConn
{
///
/// 连接SDE数据库
///
/// 数据库服务器
/// 端口号
/// 用户名
/// 密码
///
public static IWorkspace ConnectSDEWorkspace( string hostname string portstring userstring password)
{
//连接ArcSDE
Type factoryType = Type.GetTypeFromProgID(“esriDataSourcesGDB.SdeWorkspaceFactory“);
IWorkspaceFactory workspaceFactory = (IWorkspaceFactory)Activator.CreateInstance(factoryType);
//通过PropertySet设置通过SDE连接数据库的各种参数
IPropertySet propertySet = new PropertySetClass();
propertySet.SetProperty(“SERVER“ hostname);
//propertySet.SetProperty(“INSTANCE“ “port:5151“);
propertySet.SetProperty(“INSTANCE“ string.Format(“port:{0}“port));
propertySet.SetProperty(“USER“ user);
propertySet.SetProperty(“PASSWORD“ password);
propertySet.SetProperty(“VERSION“ “sde.DEFAULT“);
//通过以上设置的参数将数据库的数据通过SDE读入工作空间
try
{
IWorkspace workspace = workspaceFactory.Open(propertySet 0);
return workspace;
}
catch (Exception ex)
{
//MessageBox.Show(ex.Message “连接ArcSDE异常“);
return null;
}
}
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2015-07-02 09:45 AE_Test\
文件 8944 2015-04-14 16:10 AE_Test\AE_Test.csproj
文件 855 2015-07-02 09:45 AE_Test\AE_Test.sln
文件 16896 2015-07-02 09:45 AE_Test\AE_Test.suo
文件 6656 2015-05-29 17:16 AE_Test\AE_Test.v11.suo
文件 323 2015-04-14 10:55 AE_Test\App.config
目录 0 2015-05-27 09:03 AE_Test\bin\
目录 0 2015-05-27 09:03 AE_Test\bin\Debug\
文件 73216 2015-04-14 17:11 AE_Test\bin\Debug\AE_Test.exe
文件 323 2015-04-14 10:55 AE_Test\bin\Debug\AE_Test.exe.config
文件 91648 2015-04-14 17:11 AE_Test\bin\Debug\AE_Test.pdb
文件 11608 2015-07-02 09:44 AE_Test\bin\Debug\AE_Test.vshost.exe
文件 323 2015-04-14 10:55 AE_Test\bin\Debug\AE_Test.vshost.exe.config
文件 490 2010-03-17 22:39 AE_Test\bin\Debug\AE_Test.vshost.exe.manifest
文件 10980882 2015-04-14 08:58 AE_Test\bin\Debug\CSPolygon.dbf
文件 28660 2015-04-14 08:58 AE_Test\bin\Debug\CSPolygon.sbn
文件 1380 2015-04-14 08:58 AE_Test\bin\Debug\CSPolygon.sbx
文件 3469468 2015-04-14 08:58 AE_Test\bin\Debug\CSPolygon.shp
文件 40690 2015-04-14 08:58 AE_Test\bin\Debug\CSPolygon.shp.xm
文件 23660 2015-04-14 08:58 AE_Test\bin\Debug\CSPolygon.shx
目录 0 2015-05-27 09:03 AE_Test\bin\Debug\sr\
文件 153 2014-12-14 19:39 AE_Test\bin\Debug\sr\Krasovsky 1940.prj
文件 145 2014-12-14 19:39 AE_Test\bin\Debug\sr\PathSolveRecord.prj
目录 0 2015-05-27 09:03 AE_Test\bin\Debug\sr\地理坐标系\
文件 176 2014-12-14 19:39 AE_Test\bin\Debug\sr\地理坐标系\Beijing 1954.prj
文件 170 2014-12-14 19:39 AE_Test\bin\Debug\sr\地理坐标系\WGS 1984.prj
文件 167 2014-12-14 19:39 AE_Test\bin\Debug\sr\地理坐标系\Xian 1980.prj
目录 0 2015-05-27 09:03 AE_Test\bin\Debug\sr\投影坐标系\
目录 0 2015-05-27 09:03 AE_Test\bin\Debug\sr\投影坐标系\Beijing 1954\
文件 434 2014-12-14 19:39 AE_Test\bin\Debug\sr\投影坐标系\Beijing 1954\Beijing 1954 3 Degree GK CM 102E.prj
文件 434 2014-12-14 19:39 AE_Test\bin\Debug\sr\投影坐标系\Beijing 1954\Beijing 1954 3 Degree GK CM 105E.prj
............此处省略206个文件信息
- 上一篇:滤波器仿真小软件
- 下一篇:LinuxCNC_Getting_Started.pdf
相关资源
- IAR for MSP430 v7.10.1 注册机
- ManageEngine_OpManager_12.3安装手册+管理员
- DXperienceUniversal 10.1.6(2010年8月13日版
- ArcGIS Engine最优路径分析
- arcgis engine实现叠加分析
- arcgis 10.1 中文环境安装包
- 地图符号化(ArcEngine)
- 地图浏览(ArcEngine)
- Arcgis 扩展模块
- lenovo电源管理驱动win10版 v1.67.10.15 官
- shp转cad小工具
- Game Physics Engine Development
- Software Engineering(10th Edition)(Globa
- unity4.0官方正式版
- BullZip PDF Printer v10.10.0.2307 官方版
- Cisco Configuration Engine白皮书
- 土地信息管理系统
- Cognos10.1.1 Report Studio条件样式的灵活运
- 插件式GIS应用框架的设计与实现&mda
- 中国工具——gis插件
- ArcGiS手把手教程三——配准和矢
- arcgis_workstation地址
- ArcGIS_ArcInfo_9.3_Workstation_DVD_BT
- 游戏物理引擎开发&源代码.zip
-
Databa
se Reliability Engineering Designing - FreeFileSync 免费文件同步 v10.19 Windows版
- 联想lenovo G470 SATA AHCI驱动程序 v10.1.
- MacPorts-2.4.2-10.13-HighSierra.pkg
- TVideoGrabber.v.10.5.1.4.XE10.1.x32-x64.Cracke
- xps13 9370黑苹果10.15.1的efi文件 pm981补丁
评论
共有 条评论