zoukankan      html  css  js  c++  java
  • IPropertySet接口

    Members

      Description
    Read-only property Count The number of properties contained in the property set.包含属性个数
    Method GetAllProperties The name and value of all the properties in the property set.
    Method GetProperties The values of the specified properties.
    Method GetProperty The value of the specified property.
    Method IsEqual True if the property set is the same as the input property set.
    Method RemoveProperty Removes a property from the set.
    Method SetProperties The values of the specified properties.
    Method SetProperty The value of the specified property.
    public void GetAllProperties (
        ref object names,
        ref object values                      //The name and value of all the properties in the property set.
    );


    public void GetProperties (
        object names,
        ref object values                       //The values of the specified properties.
    );
    public object GetProperty (
        string Name                                //The value of the specified property.
    );

    主要实例是打开Oracle数据库
    //Personal Geodatabase e.g., database = "C:\myData\mypGDB.mdb"
    <span style="font-size:14px;color:#3333ff;">public IWorkspace open_pGDB_Workspace(string database)</span>
    <span style="font-size:14px;color:#3333ff;">{</span>
    <span style="font-size:14px;color:#3333ff;"><span style="white-space:pre">	</span>ESRI.ArcGIS.esriSystem.IPropertySet propertySet = new ESRI.ArcGIS.esriSystem.PropertySetClass();</span>
    <span style="font-size:14px;color:#3333ff;"><span style="white-space:pre">	</span>propertySet.SetProperty("DATABASE", database);</span>
    <span style="font-size:14px;color:#3333ff;"><span style="white-space:pre">	</span>IWorkspaceFactory workspaceFactory = new ESRI.ArcGIS.DataSourcesGDB.AccessWorkspaceFactoryClass();</span>
    <span style="font-size:14px;color:#3333ff;"><span style="white-space:pre">	</span>return workspaceFactory.Open(propertySet, 0);</span>
    <span style="font-size:14px;color:#3333ff;">}</span>
    // File Geodatabase e.g., database = "C:\myData\myfGDB.gdb"
    <span style="color:#3333ff;">public IWorkspace open_fGDB_Workspace(string database)</span>
    <span style="color:#3333ff;">{</span>
    <span style="color:#3333ff;"><span style="white-space:pre">	</span>ESRI.ArcGIS.esriSystem.IPropertySet propertySet = new ESRI.ArcGIS.esriSystem.PropertySetClass();</span>
    <span style="color:#3333ff;"><span style="white-space:pre">	</span>propertySet.SetProperty("DATABASE", database);</span>
    <span style="color:#3333ff;"><span style="white-space:pre">	</span>IWorkspaceFactory workspaceFactory = new ESRI.ArcGIS.DataSourcesGDB.FileGDBWorkspaceFactoryClass();</span>
    <span style="color:#3333ff;"><span style="white-space:pre">	</span>return workspaceFactory.Open(propertySet, 0);</span>
    <span style="color:#3333ff;">}</span>

    //SDE Geodatabase e.g., server = "Kona" // database = "sde" or "" if Oracle // instance = "5151" // user = "vtest" // password = "go" // version = "SDE.DEFAULT" public IWorkspace open_ArcSDE_Workspace(string server, string instance, string user,string password, string database, string version) { ESRI.ArcGIS.esriSystem.IPropertySet propertySet = new ESRI.ArcGIS.esriSystem.PropertySetClass(); propertySet.SetProperty("SERVER", server); propertySet.SetProperty("INSTANCE", instance); propertySet.SetProperty("DATABASE", database); propertySet.SetProperty("USER", user); propertySet.SetProperty("PASSWORD", password); propertySet.SetProperty("VERSION", version); IWorkspaceFactory workspaceFactory = new ESRI.ArcGIS.DataSourcesGDB.SdeWorkspaceFactoryClass(); return workspaceFactory.Open(propertySet, 0); }




  • 相关阅读:
    将时间超过万的数字转换为保留两位小数的阅读
    获取日期的最早和最晚时间
    Mybatis 关联查询分页问题的解决
    使用 java stream 获取两个集合之间的交集.差集
    使用 Stream 流对集合排序,包含对空属性的处理
    SpringBoot 多个子项目中下载 excel 报错解决方法
    单元测试捕获异常的写法
    单元测试用例需要登录信息的写法
    openwaf实战
    70个python练手项目
  • 原文地址:https://www.cnblogs.com/dengshiwei/p/4258582.html
Copyright © 2011-2022 走看看