zoukankan      html  css  js  c++  java
  • How can I get a layer's DataSource properties.

    http://forums.arcgis.com/threads/47114-How-can-I-get-a-layer-s-DataSource-properties. 获取图层名 IPublishLayer  ILayer IPublishLayer
    1. How can I get a layer's DataSource properties. I have some loaded layers in a map control, and I would like to get some information from these layers.Do you know what classes/interfaces I need to use in order to get theinformation that is displayed in a layer properties Source tab. (Seeattached pic) Keep in mind, these are ALREADY loaded layers. I'm not attempting norable to load the layers myself and get the information at that point.(if that makes any difference) I'm looking for the data for these items
      • Data Type:
      • Feature Class:
      • SERVER:
      • INSTANCE:
      • Location:
      • AUTHENTICATION_MODE:
      • VERSION:
      I already have the information for
      • Feature Type
      • Geometry Type
      Attached Thumbnails  Reply With QuoteTopBottom
    2. 01-05-2012 04:04 PM#2renon Bing ZHENG
      Join Date
      Apr 2010
      Posts
      19
      Points
      0
      Answers Provided
      0

      0 Re: How can I get a layer's DataSource properties. Just for reference, may be wrong •Data Type: IFeatureLayer.DataSourceType •Feature Class: IFeatureLayer.featureClass •SERVER: IFeatureLayer.featureClass->Idataset->IpropertySet->GetProperty("Server") •INSTANCE:IFeatureLayer.featureClass->Idataset->IpropertySet->GetProperty("Instance") •Location:IFeatureLayer.featureClass->Idataset->IpropertySet->GetProperty("database") •AUTHENTICATION_MODE:IFeatureLayer.featureClass->Idataset->IpropertySet->GetProperty("AUTHENTICATION_MODE") •VERSION:IFeatureLayer.featureClass->Idataset->IpropertySet->GetProperty("version") Regards, Bing Reply With QuoteTopBottom
    3. 01-05-2012 04:07 PM#3Pimplebutt ESRI Customer
      Join Date
      Jun 2010
      Posts
      38
      Points
      0
      Answers Provided
      0

      0 Re: How can I get a layer's DataSource properties. Originally Posted by renonJust for reference, may be wrong •Data Type: IFeatureLayer.DataSourceType •Feature Class: IFeatureLayer.featureClass •SERVER: IFeatureLayer.featureClass->Idataset->IpropertySet->GetProperty("Server") •INSTANCE:IFeatureLayer.featureClass->Idataset->IpropertySet->GetProperty("Instance") •Location:IFeatureLayer.featureClass->Idataset->IpropertySet->GetProperty("database") •AUTHENTICATION_MODE:IFeatureLayer.featureClass->Idataset->IpropertySet->GetProperty("AUTHENTICATION_MODE") •VERSION:IFeatureLayer.featureClass->Idataset->IpropertySet->GetProperty("version") Regards, Bing Thanks a lot. I'll try those and report back. Reply With QuoteTopBottom
    4. 01-17-2012 07:08 AM#4abridle Andy Bridle
      Join Date
      Jan 2012
      Posts
      3
      Points
      0
      Answers Provided
      0

      0 Re: How can I get a layer's DataSource properties. have you got a sample of this working? I'm trying to do exactly thesame thing with some SDE layers in a map but hitting an error. pfeatureclass = pfeaturelayer.FeatureClass pdataset = pfeatureclass.FeatureDataset MsgBox(pdataset.PropertySet.GetProperty("Server")) pfeatureclass seems to be set okay but pdataset is always nothing which then causes the propertyset to fail Reply With QuoteTopBottom
    5. 01-17-2012 07:31 AM#5sshetty Swapna Shetty
      Join Date
      Jun 2011
      Posts
      111
      Points
      30
      Answers Provided
      4

      0 Re: How can I get a layer's DataSource properties. You can use pfeatureclass.FeatureDataset if the feature class is storedinside feature dataset. if not use below statement to convertifeatureclass to idataset and then get the connection properties. IDataset pdataset = pfeatureclass as IDataset; Reply With QuoteTopBottom
    6. 01-17-2012 10:39 AM#6ldonahue Leo Donahue
      Join Date
      Apr 2010
      Posts
      233
      Points
      1
      Answers Provided
      0

      0 Re: How can I get a layer's DataSource properties. Well, another option, if the data is published via server, would be to use: .NET IPublishLayer.DataDetails http://help.arcgis.com/en/sdk/10.0/a...0p29000000.htm Java FeatureLayer.getDataDetails() http://help.arcgis.com/en/sdk/10.0/j...tureLayer.html You get a nicely formatted String with those properties you're looking for. Data Type: ArcSDE Database Location: Server: Server Name User: username Instance: sde:sqlserver:whatever Version: dbo.DEFAULT Description: Instance default version. Feature Class: server.owner.name And, as you can see the Java version gets the output wrong. I reported as a potential bug...
  • 相关阅读:
    不同地区Android开发者使用哪些设备测试APP?
    IIS6、IIS7.5设置网站默认首页方法(Directory Listing Denied)
    大数据正在改变我们的生活
    如何在MySQL中使用explain查询SQL的执行计划?
    整合spring cloud云架构
    对SQL 优化,提升性能!
    传统分布式架构如何进行容器化升级
    Android开发实践:Android.mk模板
    如何从代码层面优化系统性能
    德国又出超实用的厨房神器
  • 原文地址:https://www.cnblogs.com/adodo1/p/4327323.html
Copyright © 2011-2022 走看看