日韩久久久精品,亚洲精品久久久久久久久久久,亚洲欧美一区二区三区国产精品 ,一区二区福利

用Data source-specific APIs 編程

系統(tǒng) 2262 0

ArcGIS Server APIs
SOAP
1)XML-structured 語言。
2)
對(duì) server objects server object extensions 可用。
3)
設(shè)計(jì)用作 stateless 交互。
4)Catalog
請求由 IServerCatalogAdmin 接口處理。
5)Service
請求由 IRequestHandler 接口處理。
ArcObjects
1)
遠(yuǎn)程與 GIS Server 上的 ArcObjects 交互。
2)
使用客戶端的 Primary Interop Assemblies (PIA) object libraries
3)
通過 SOM 訪問獲得 ArcGIS Server services
4)
設(shè)計(jì)用作 stateless stateful 交互。

ArcGIS Server MapResource 類型

A MapResourceInternet – 連接到 Web service endpoint

B MapResourceLocal – 連接到 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) 遠(yuǎn)程訪問 ArcObjects

2)MapServerLocal

MapServer > IMapServer (COM) >IMapServerObjects (COM)

3) 通過 .NET 部件訪問高級(jí)的 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) 所有的過程在遠(yuǎn)程完成

?

?

用Data source-specific APIs 編程

?

ArcObjects 遠(yuǎn)程編程

1) 能在服務(wù)器上創(chuàng)建新的對(duì)象

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)

?

常用開發(fā)模式

    --首先建立連接

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

--獲得服務(wù)器對(duì)象

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

--使用服務(wù)器對(duì)象

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) ; 

--釋放服務(wù)器對(duì)象

m_pServerContext . ReleaseContext () ;


  

??

?

?

用Data source-specific APIs 編程


更多文章、技術(shù)交流、商務(wù)合作、聯(lián)系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號(hào)聯(lián)系: 360901061

您的支持是博主寫作最大的動(dòng)力,如果您喜歡我的文章,感覺我的文章對(duì)您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點(diǎn)擊下面給點(diǎn)支持吧,站長非常感激您!手機(jī)微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點(diǎn)擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對(duì)您有幫助就好】

您的支持是博主寫作最大的動(dòng)力,如果您喜歡我的文章,感覺我的文章對(duì)您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會(huì)非常 感謝您的哦!!!

發(fā)表我的評(píng)論
最新評(píng)論 總共0條評(píng)論
主站蜘蛛池模板: 新乡县| 犍为县| 桐乡市| 来安县| 平邑县| 长泰县| 涞水县| 昌图县| 石楼县| 洛阳市| 武胜县| 五大连池市| 大足县| 无为县| 安阳市| 甘肃省| 城口县| 英超| 林周县| 昌黎县| 聂拉木县| 扬中市| 常德市| 高雄县| 开化县| 海原县| 怀安县| 安达市| 绥宁县| 丹棱县| 平塘县| 乾安县| 静安区| 张家港市| 镇江市| 安泽县| 碌曲县| 乐都县| 宾阳县| 漳州市| 长白|