1 / 53

ArcGIS Server Mobile ADF

ArcGIS Server Mobile ADF. ESRI 中国 白旭阳. 议程安排. 介绍 什么是 Mobile ADF 适用情景 先决条件 Mobile ADF 架构简介 组件 查询 编辑 系统部署 问答. 什么是 Mobile ADF?. 与 ArcGIS Server 一起分发的一个开发包 . 使用 .Net 组件 开发自定义的 以 Server 为中心的 轻量级 移动 应用程序 支持简单 外业工作流程 数据浏览 数据检查 ( 属性编辑 ) 基础数据搜集 ( 红线数据 ) 连接与非连接 环境均适用

kasi
Télécharger la présentation

ArcGIS Server Mobile ADF

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ArcGIS Server Mobile ADF ESRI中国 白旭阳

  2. 议程安排 • 介绍 • 什么是 Mobile ADF • 适用情景 • 先决条件 • Mobile ADF • 架构简介 • 组件 • 查询 • 编辑 • 系统部署 • 问答

  3. 什么是Mobile ADF? • 与ArcGIS Server一起分发的一个开发包. • 使用.Net组件开发自定义的以Server为中心的轻量级移动应用程序 • 支持简单外业工作流程 • 数据浏览 • 数据检查(属性编辑) • 基础数据搜集(红线数据) • 连接与非连接环境均适用 • 可用于Windows Mobile环境和平板电脑

  4. 交通事故数据采集应用需求 • 某市交通管理部门下属的交通事故数据采集机构希望能有满足如下需求的解决方案: • 办公无纸化 • 几乎实时的信息汇报 • 最少的数据采集成本 • 针对性强的应用程序 • 不用回到办公室即可完成工作 • 简单的数据部署与综合

  5. 交通事故数据采集解决方案 • 为外业应用准备所需的数据和地图。 • 使用ArcGIS server将地图以一个 webservice的形式发布出来。 • 为外业设备创建符合特定需求的应用程序。 • 外业设备装载特定的应用程序和所需的数据后发放给数据采集人员。 • 数据采集人员获取指定数据 • 设备自动将数据与服务器同步 • 新的数据即可被后方部门用于分析和决策。 GIS Server Web Services PDA PDA PDA

  6. 示例 交通事故数据采集人员 地图制作 地图发布

  7. 表:血液、呼气酒精含量与事故相对危险度

  8. 交通事故数据采集解决方案 • 为外业应用准备所需的数据和地图。 • 使用ArcGIS server将地图以一个 webservice的形式发布出来。 • 为外业设备创建符合特定需求的应用程序。 • 外业设备装载特定的应用程序和所需的数据后发放给数据采集人员。 • 数据采集人员获取指定数据 • 设备自动将数据与服务器同步 • 新的数据即可被后方部门用于分析和决策。 GIS Server Web Services PDA PDA PDA

  9. Mobile ADF(移动应用程序开发框架)满足外业需求的新技术 • 外业数据挖掘 • 外业数据提交 • 外业数据搜集 • 外业数据审查 • 外业量测 • 工作流管理 设施改造报告 城市设施 检查 垃圾箱 管理 电力附属设置 检查 资产报告(GASB 34) 消防栓 维护 资产 管理

  10. 什么是Mobile ADF? ArcGIS Server 开发解决方案 专业的移动应用

  11. 议程安排 • 介绍 • 什么是 Mobile ADF • 适用情景 • 先决条件 • Mobile ADF • 架构简介 • 组件 • 查询 • 编辑 • 系统部署 • 问答

  12. Mobile ADF开发人员应具备的条件 • 熟悉 • .Net Framework 2.0 • .Net Compact Framework 2.0 • C# or VB.NET • Visual Studio 2005 • SDK for Windows Mobile 5.0 for Pocket PC 5.0 development • SDK for Windows Mobile 5.0 for Smartphone 5.0 development • 已安装了Active Sync 4.1 • 对ADO.Net概念有深入理解 • 熟悉用于测试部署的移动设备 • 熟悉GPS设备 • 设备维护 • 熟悉外业工作流程 • 熟悉ArcGIS Server

  13. 推荐阅读 • Team Beta Bloghttp://blogs.esri.com/roller/page/Beta92ArcGISSrvrMblADFT • .Net Compact Framework http://msdn.microsoft.com/netframework/programming/netcf/default.aspxhttp://msdn.microsoft.com/vstudio/tour/vs2005_guided_tour/VS2005pro/Smart_Client/NETCFOverview.htm • ADO.Net http://msdn2.microsoft.com/en-us/library/h43ks021.aspx • Mobile Development and Deploymenthttp://msdn.microsoft.com/mobility/ • Smart Client Developmenthttp://msdn.microsoft.com/smartclient/ • Microsoft Patterns and Practices: Mobile Client Software Factoryhttp://msdn.microsoft.com/practices/default.aspx?pull=/library/en-us/dnpag2/html/mcsflp.asp • Multithreading in .Nethttp://msdn2.microsoft.com/en-us/library/5xt1dysy.aspx • GPS Tutorialhttp://www.trimble.com/gps/

  14. .NET Compact Framework • .Net Framework的子集 • 为小型设备做了优化 • 并非所有功能和.Net Framework一样 • 阅读相关文档 • 可使用Visual Studio的设备模拟器开发,真实设备测试和部署

  15. 示例 Visual Studio 2005 平台及开发包 设备模拟器 开发组件 部署

  16. 议程安排 • 介绍 • 什么是 Mobile ADF • 适用情景 • 先决条件 • Mobile ADF • 架构简介 • 组件 • 查询 • 编辑 • 系统部署 • 问答

  17. Mobile ADF要点 • 是ArcGIS Server面对移动设备的开发包: • .Net Mobile下GIS组件 • 为Client-Server形式的应用程序而设计 • 支持多种连通性情况 • 长事务和短事务 • 版本化的编辑 • 具有离线编辑能力 • 使用Visual Studio 2005 WinForms • 低系统资源消耗,高性能

  18. Enterprise Bus GIS Server Web Services Desktop Smart phone Pocket PC Laptop Tablet PC Server Architecture

  19. Mobile ADF部署平台 • Microsoft .NET/.NET Compact Framework 2.0 • Windows Mobile 5.0 • PocketPC • SmartPhone • Windows Mobile for Pocket PC 2003, 2003 SE • Windows CE 5.0 • Windows XP

  20. 企业级Mobile架构 • Mobile Client • Map, MapActions • MapCache • ServerConnection • Mobile Server • Web services • Staging of data • Existing Systems • GDB Replications • SDE GPRS EDGE HSDPA 802.11 Cradle Mobile ADF ArcGIS Server Enterprise Systems Web Services User Experience Web Services & Data Business Logic Management Security Connectivity Data & Web Svc Server Manager

  21. 议程安排 • 介绍 • 什么是 Mobile ADF • 适用情景 • 先决条件 • Mobile ADF • 架构简介 • 组件 • 查询 • 编辑 • 系统部署 • 问答

  22. Mobile ADF Windows窗体 数据同步 服务 用户交互控件 数据访问API 网络资源 设备数据 存储器 .Net Framework / Compact .Net Framework

  23. Mobile ADF核心组件 Map MapAction Server Connection MapCache ArcGIS Server

  24. MapCache • Map Document的本地副本 • 包含如下内容: • FeatureLayers • RasterLayers • AnnotationLayers • 对数据可进行如下操作: • 添加 • 删除 • 编辑

  25. Geometry • 基于整数表达 • Windows 移动设备中无数学运算器 • Points, multipoints, lines, polygons • 支持的操作 • Distance, • Equality, • Relationship • Touches • Intersects • Within • Overlap • Cross • Contain • Disjoint • 不支持 splitting, joining, buffering

  26. ServerConnection • ServerConnection • MapCache与服务器之间的数据同步 • URL地址连接发布的MobileServer WebService • 异步执行 • 支持Soap和Binary两种ArcGIS server Web Services

  27. MapAction • 通过Map Events与地图交互或修改地图 • 漫游动作 • ZoomIn • ZoomOut • Pan • 要素动作 • Sketch • Selection • 自定义MapAction

  28. 自定义 MapAction • 组件允许用户与地图和输入设备进行交互 • 简化复杂的工作流并将其封装入一个简单工具 • 创建并分发专用组件 • 实现MapAction类

  29. Gps 组件 NMEA SerialPort Gps Connection Map GpsDisplay FileGps ScaleBar

  30. Gps 组件 • GPS 连接 • 识别 NMEA 数据流 • FileGpsConnection 和 SerialPortGpsConnection • GPS 数据以 WGS84 坐标系下的纬度/经度 形式存储 • 使用SpatialReference 类支持投影: • Lambert Conformal Conic, • Mercator, • Transverse Mercator, • Stereographic • GpsDisplay • 与Map 和 GPS 连接绑定 • 显示当前位置,轨迹和Re-center Map

  31. ScaleBar • 直接与Map绑定 • 采用公制和US惯例 • 可调整大小或固定宽度 • 可显示服务器同步进度

  32. 议程安排 • 介绍 • 什么是 Mobile ADF • 适用情景 • 先决条件 • Mobile ADF • 架构简介 • 组件 • 查询 • 编辑 • 系统部署 • 问答

  33. ADO.Net 接口 ADO.Net Annotation Layer FeatureLayer DataTable Layer Collection Feature Layer Feature DataReader Raster Layer MapCache

  34. 查询数据 • 对地图缓存中的矢量图层进行空间和属性查询 • 结果数据读取入 • FeatureLayerDataTable (ADO DataTable) • FeatureDataReader (ADO IDataReader) • Reader • 速度快 • 仅能单向遍历 • 较小的内存消耗 • DataTable • 速度较慢 • 可向前向后双向遍历 • 查询是在本地数据中执行的 • Reader 适于读取,DataTable 适于编辑和绑定数据控件

  35. FeatureDataReader Polygon polygon; long area = 0; QueryFilter queryFilter = new QueryFilter(map1.GetFullExtent(), EsriGeometricRelationship.Within, "Owner = 'Smith'", true); using (FeatureDataReader reader = layer.GetDataReader(queryFilter, "Parcels")) { while (reader.Read()) { polygon = reader.GetGeometry as Polygon; area += polygon.GetArea(); } } MessageBox.Show("Smith owns area of " + mapCache1.SpatialReference.FromGeometry(area).ToString())

  36. FeatureLayerDataTable Polygon polygon; long area = 0; QueryFilter queryFilter = new QueryFilter(map1.GetFullExtent(), EsriGeometricRelationship.Within, "Owner = 'Smith'", true); FeatureLayerDataTable table = layer.GetDataTable(queryFilter, "Parcels"); foreach (DataRow row in table) { polygon = row[table.GeometryColumnIndex] as Polygon; area += polygon.GetArea(); } MessageBox.Show("Smith owns area of " + mapCache1.SpatialReference.FromGeometry(area).ToString())

  37. 示例 基于 FeatureLayerDataTable 进行查询

  38. Display Expressiona.k.a. Definition Queries • Display expression改变地图中的数据表达 • 该方法应用于MapLayer (并非FeatureLayer) // 仅显示省会城市 // 并且人口超过200万. map1.MapLayers[“cities”].DisplayExpression = “Capital = 'yes‘ AND POP_2000 > 2000000”;

  39. 议程安排 • 介绍 • 什么是 Mobile ADF • 适用情景 • 先决条件 • Mobile ADF • 架构简介 • 组件 • 查询 • 编辑 • 系统部署 • 问答

  40. 使用Mobile ADF进行编辑 • 仅后台数据来自于SDE的图层才可编辑 • 数据编辑可在离线状态下进行 • 仅当数据提交到服务器时才需要进行连接 • Client-server模式编辑使用短事务 • 编辑支持非版本化和版本化的数据库 • 几何体的编辑是通过 Sketch 组件完成的 • 属性编辑是通过 ADO.Net 组件完成的

  41. ADO.Net编辑数据工作流 • 从 FeatureLayer获取中 DataTable • 从 DataTable 中编辑要素: • 获取一个已有要素,编辑或删除 • 添加一个新要素 • 传回 DataTable 对象以更新 FeatureLayer • 当与服务器的连接有效时提交 FeatureLayer 的更新

  42. // Get the FeatureLayer DataTable FeatureLayer featureLayer = mapCache1.cacheLayers[0] as FeatureLayer FeatureLayerDataTable table = featureLayer.GetDataTable(); // Create a new Feature DataRow editedFeature = table.NewRow(); editedFeature[table.GeometryColumnIndex] = new ESRI.ArcGIS.Mobile.Point(e.MapCoordinate); editedFeature[“Owner"] =“John Doe”; table.Rows.Add(editedFeature); // Update FeatureLayer table.UpdateFeatureLayer(); // Post updated data to the server serverConnection1.PostFeaturesAsync(); 编辑数据

  43. 示例 编辑

  44. 所支持的编辑情景 非版本化的数据库 • 数据库由 GIS 管理员安装 • 以最后的外业编辑为准 版本化的数据库 • 包含上面的特性 • 版本与其发布的mxd是一样的 • 用户可编辑任何名称的数据库版本 编辑为设备创建的 空间数据库版本 • 服务器为每个客户端请求 创建版本 • 所有编辑存储在自定义版本中 • 编辑完成后版本被调和

  45. 依靠版本和非版本数据库 最后提交生效模式 服务器与客户端之间为原子化事务 不支持 undo 或 redo 操作 基于单一版本,没有为多个外业工作者提供冲突处理机制 客户端连接到一个已知的现有版本 不同的版本可用于将相同工作区中工作组的工作分离,以减少潜在冲突发生的可能性 短事务编辑

  46. 服务器版本间的切换 FeatureLayer layer = mapCache1.CacheLayers[0] as FeatureLayer; // switch from the Default version // to the Engineering version // you must know which versions are available if (layer.Workspace.VersionName == "Default") layer.EditingVersionName = "Engineering"; // Perform editing //... // serverConnection1.PostFeaturesAsync(); // Switch back to the original version if needed. layer.EditingVersionName = "Default";

  47. 设备可请求服务器为编辑创建一个专用版本. 当外业工作完成后,专用版本可提交和调和. 如果发现冲突,该版本将被保留在服务器上,待服务器端手动调和. 为编辑创建的专用版本

  48. Using Dedicated Versions // Editing first layer FeatureLayer layer = mapCache1.CacheLayers[0] as FeatureLayer; serverConnection1.CreateDedicatedVersionAsync(layer.Workspace.WorkspaceId,"Tom_June16_Edits_Pasadena", null); // perform edits against the version // ... // serverConnection1.PostFeaturesAsync() // serverConnection1.CloseDedicatedVersionAsync(layer.Workspace.WorkspaceId,EsriCloseVersionOptions.ReconcilePostVersion,null);

  49. 议程安排 • 介绍 • 什么是 Mobile ADF • 适用情景 • 先决条件 • Mobile ADF • 架构简介 • 组件 • 查询 • 编辑 • 系统部署 • 问答

  50. 应用程序与数据部署

More Related