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

用Data source-specific APIs 編程

系統 2190 0

ArcGIS Server APIs
SOAP
1)XML-structured 語言。
2)
server objects server 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 類型

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) 遠程訪問 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) 所有的過程在遠程完成

?

?

用Data source-specific APIs 編程

?

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


  

??

?

?

用Data source-specific APIs 編程


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

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

【本文對您有幫助就好】

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

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 沁源县| 嘉义市| 乐都县| 奉节县| 砀山县| 安化县| 安多县| 综艺| 桃园市| 揭西县| 信宜市| 南康市| 东阿县| 固安县| 米脂县| 乐安县| 乌拉特中旗| 普定县| 政和县| 富民县| 台前县| 三江| 楚雄市| 观塘区| 常州市| 林芝县| 呼和浩特市| 延吉市| 吐鲁番市| 永春县| 邵东县| 天峨县| 宁强县| 嘉黎县| 平乐县| 桃江县| 旅游| 许昌市| 密云县| 平舆县| 盘锦市|