`

用Data source-specific APIs 编程

阅读更多

ArcGIS Server APIs
SOAP
1)XML-structured 语言。
2)
server objectsserver object extensions可用。
3)
设计用作stateless 交互。
4)Catalog
请求由IServerCatalogAdmin 接口处理。
5)Service
请求由IRequestHandler 接口处理。
ArcObjects
1)
远程与GIS Server上的ArcObjects 交互。
2)
使用客户端的Primary Interop Assemblies (PIA) object libraries
3)
通过SOM访问获得ArcGIS Server services
4)
设计用作stateless stateful 交互。

ArcGIS Server MapResource 类型

AMapResourceInternet – 连接到Web service endpoint

BMapResourceLocal – 连接到Server Object Manager

1)访问ServerContext

2)使用ArcObjects

 

ArcGIS Server Internet: SOAP编程

1)MapResourceInternet

MapServerProxy, 访问value objects

2)通讯是stateless

3)使用pooled objects

Dim mapRes as ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer.MapResourceInternet

mapRes = gisFunc.Resource

Dim mapsProxy as ArcGISServer.MapServerProxy = mapRes.MapServerProxy

Dim mapInfo as ArcGISServer.MapServerInfo =

mapsProxy.GetServerInfo(mapsProxy.GetDefaultMapName())

Dim mapDesc as ArcGISServer.MapDescription = mapInfo.DefaultMapDescription

Dim mLayerInfo as ArcGIServer.MapLayerInfo()

mLayerInfo = mapRes.MapServerInfo.MapLayerInfos

Dim layerDescs as ArcGISServer.LayerDescription()

layerDescs = mapDesc.LayerDescriptions

 

ArcGIS Server Local: ArcObjects 编程

1)远程访问ArcObjects

2)MapServerLocal

MapServer > IMapServer (COM) >IMapServerObjects (COM)

3)通过.NET部件访问高级的functionality

 

Dim mapFunc as IMapFunctionality = Map1.GetFunctionality(0)

Dim ags_mr as ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer.MapResourceLocal

ags_mr =

CType(mapFunc.Resource,ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer.MapResourceLocal)

' Access the ArcObjects COM ServerObject directly

Dim mapServer as ESRI.ArcGIS.Carto. IMapServer = CType(ags_mr.MapServer,IMapServer)

Dim mapServerObjs as ESRI.ArcGIS.Carto.IMapServerObjects

mapServerObjs = CType(mapServer,IMapServerObjects)

Dim map as ESRI.ArcGIS.Carto.IMap = mapServerObjs.Map

' Now perform more ArcObjects operations

Dim featClass as IFeatureClass = CType(map.Layers(0)).FeatureClass,

 

 

深入ArcGIS Server Local API

1)MapResourceLocal

通过DCOM访问server上的ArcObjects

ServerContext

2)所有的过程在远程完成

 

 

 

ArcObjects 远程编程

1)能在服务器上创建新的对象

2)MapServerLocal

ServerContextInfo

ServerContext

3)不需要release servercontext

Dim ags_mr as ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer.MapResourceLocal

ags_mr =

CType(qfunc.Resource,ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer.MapResourceLocal)

' Create a new ArcObjects COM objects

Dim context as ESRI.ArcGIS.Server.IServerContext = ags_mr.ServerContextInfo.ServerContext

Dim pnt as ESRI.ArcGIS.Geometry.IPoint = context.CreateObject("esriGeometry.Point")

pnt.X = 60

pnt.Y = 100

Dim topo as ESRI.ArcGIS.Geometry.ITopologicalOperator = CType(pnt, Itopological)

 

常用开发模式

--首先建立连接

Identity identity = new Identity("username", "pwd", "domain");
AGSServerConnection connection = new AGSServerConnection("fmc-pca187", identity);
connection.Connect();

--获得服务器对象

IServerObjectManager m_pSOM = connection. ServerObjectManager ;
IServerContext m_pServerContext = m_pSOM. CreateServerContext (" testMap" , "MapServer" ) ;
IMapServer pMapServer = m_pServerContext . ServerObject  as IMapServer ;

--使用服务器对象

IMapServerObject s pMapServerObject s = ( IMapServerObject s) pMapServer ;
IMap pMap = pMapServerObject s. get_Map (pMapServer .DefaultMapName) ;
IFeatureLayer p FLayer = ( IFeatureLayer) pMap. get_Layer(0) ;
IFeatureClass p FeatureClass = p FLayer . FeatureClass ;
int i = p FeatureClass. FeatureCount (null) ; 

--释放服务器对象

m_pServerContext . ReleaseContext () ;

  

 

 

分享到:
评论

相关推荐

    ArcServer四种开发方式

    Esri一共提供了四种开发模式: 1.Web ADF/Web Control 页面ADF框架和页面...4.Data Source Specific APIs 直接使用数据源具体API 这四种开发方式难度是有易至难的,但其可定制性也越强,下面就具体分析这四种开发方式。

    Core Software Security: Security at the Source

    Secure Coding Frameworks (APIs) Manual Code Review Independent Code Review and Testing (by Experts or Third Parties) Static Analysis Risk Assessment Methodology Integration of SDL with SDLC ...

    应用Dephi 开发佳能照相机API

    When using the EDSDK libraries, you must call this API once before using EDSDK APIs. Parameters: In: None Out: None Returns: Returns EDS_ERR_OK if successful. In other cases, see EDSDKError....

    Mastering Play Framework for Scala(PACKT,2015)

    Play Framework is an open source web application framework that is written in Java and Scala. It follows the Model-View-Controller architectural pattern and enables the user to employ Scala for ...

    selenium webdriver 3 practical guide 第二版

    Selenium WebDriver is an open source automation tool implemented through a browser-specific driver, which sends commands to a browser and retrieves results. The latest version of Selenium 3 brings ...

    Hadoop权威掼.pdf

    * Learn the Hadoop Distributed File System (HDFS), including ways to use its many APIs to transfer data * Write distributed computations with MapReduce, Hadoop's most vital component * Become familiar...

    ComponentOne 2012 V2 ActiveReports 7(完整安装)

    Its unique architecture allows the lean reporting engine to quickly read records from the data source and immediately render them to the output device. The simplicity of the design allows the data to...

    ComponentOne 2012 V2 ActiveReports 7 1/3

    Its unique architecture allows the lean reporting engine to quickly read records from the data source and immediately render them to the output device. The simplicity of the design allows the data to...

    ComponentOne 2012 V2 ActiveReports 7 3/3

    Its unique architecture allows the lean reporting engine to quickly read records from the data source and immediately render them to the output device. The simplicity of the design allows the data to...

    Google C++ Style Guide(Google C++编程规范)高清PDF

    Google-Specific Magic Smart Pointers cpplint Other C++ Features Reference Arguments Function Overloading Default Arguments Variable-Length Arrays and alloca() Friends Exceptions Run-Time Type ...

    PLX PCI卡 linux驱动

    Simple application that calls various PLX APIs for a selected device & verifies return codes & parameters. The API calls made depend upon the type of device selected. - DSlave Demonstrates how to ...

    2009-5出版的《Programming with the Google SDK》

    This practical book provides the concepts and code you need to develop software with Android, the open-source platform for cell phones and mobile devices that's generating enthusiasm across the ...

    eac3to V3.17

    * fixed: audio delay was incorrect when 1st m2ts part contained no audio data * fixed: very small WAV files were not detected correctly * fixed: "eac3to source.eac3 dest.dts -core" crashed v3.12 * ...

    VB编程资源大全(英文源码 控件)

    1 , vb5dialog.zip This demonstrates how to subclass the Common Dialog Dialogs and manipulate a specific Dialog.<END><br>2 , cpnl.zip Form_Taskbar is a control for Visual Basic which, once placed...

    Spring.Persistence.with.Hibernate.2nd.Edition.1484202694

    Persistence is an important set of techniques and technologies for accessing and using data, and ensuring that data is mobile regardless of specific applications and contexts. In Java development, ...

    Professional.MFC.with.VC6

    Shell APIs The Shell Namespace The Taskbar Notification Area Summary Chapter 10: Utility and Exception Classes CStrings Constructing CString Objects CString Operators CStrings and String ...

    Android Application Development

    learn the concepts and architecture of a specific feature set, including views, maps, location-based services, persistent data storage, 2D and 3D graphics, media services, telephony services, and ...

    julia-1.1.0-win64

    Current stable release...Call C functions directly (no wrappers or special APIs needed) Powerful shell-like capabilities for managing other processes Lisp-like macros and other metaprogramming facilities

    VB编程资源大全(英文源码 API)

    The code has been tested under NT4 SP6a<END><br>31,passdemo.zip This is a very good example of how to use the registry to save data. It shows how to create, store and save a password to the ...

Global site tag (gtag.js) - Google Analytics