摘要
摘要
地理信息系统(Geographic Information System,GIS)是融合了采集、处理、分析、存储及展示地理信息数据等功能的计算机信息系统。GIS客户端架构包括C/S架构和B/S架构两种。由于B/S架构的GIS客户端基于浏览器实现,所以在易用性和兼容性上要比C/S架构表现更出。但目前主流的B/S架构GIS客户端均以二维地图为主要研究目标,这在处理和展示三维空间信息数据时存在很大局限性,不能满足用户对三维空间数据的处理需求。如果能够将二维和三维地图集成到同一个GIS中,在浏览器中并列显示二维和三维地图,实现二维和三维地图的联动和数据同步,用户就可以通过两个维度同时去观察和处理地理信息数据。
因此,为充分利用B/S架构的优势,同时完善其不足之处,本文提出基于Web 的GIS二三维一体化概念,研究了基于B/S架构二维和三维WebGIS展示关键技术,将二维和三维地图整合到了同一个WebGIS中,实现了二三维地图一体化同步展示。
本文所做的研究工作主要包括:
1.研究了WebGIS可视化技术和图形渲染技术,详细解读了三维地图类库Cesium 和二维地图类库OpenLay
ers3中的源代码,分析了地图类库如何实现地理信息数据的展示和处理,为二三维一体化的实现打下基础。
2.结合以上研究工作,通过对Cesium和OpenLayers3中底层数据的转换、接口的封装以及功能的扩展,实现了二维和三维地图的联动,数据显示、更新与分析结果的同步,并且与OGC Web服务无缝集成,完成了WebGIS二三维一体化的目标。
3.在二三维一体化基础之上,设计并实现了WebGIS负责地理信息数据的测量标注、地名服务、图幅网格等展示模块,提供了地图的基本操作以及数据的展示、获取和分析功能,构建了一个完整的、具备地理信息数据展示和处理功能的WebGIS。
4.在完成二三维一体化WebGIS设计与实现之后,进行了系统优化工作。将静态文件进行压缩合并,从而达到减少HTTP请求的次数和缩小请求数据体积的目标,利用HTTP消息头实现浏览器缓存策略,最大程度上减少了用户等待页面数据加载的时间,提升了用户体验。
本文设计实现的基于Web的二三维一体化展示关键技术的GIS系统,利用Web 技术的跨平台特性,将二维地图对地理地貌数据的展示和三维地球对地理空间地形数据的展示相结合,实现了以二维地图和三维地图一体化同步的地理信息数据展示平台。本系统功能丰富,易于用户操作,完成了项目规划的预期目标。在系统交付使用之后,表现稳定、可靠,符合用户要求,在实际工程实践应用中发挥了关键作用。
关键词:二三维一体化,Cesium,OpenLayers3,WebGIS
ABSTRACT
ABSTRACT
Geographic Information System(GIS)is an computer information system that integrates functions such as collecting,processing,analyzing,storing and displaying geographic information data.The GIS client architecture includes both C/S architecture and B/S architecture.Because the GIS client based on the B/S architecture is implement in the browser.,so it is easier to use and has a better performance in compatibility.But the current B/S architecture GIS client are take2D map as the main research objectives,this is very limited in the processing and display3D spatial information data,and can not meet the user's demands.If we can integrate2D and3D maps into the same GIS,and display2D and3D map side by side in browser to achieve map linkage data synchronization,the users can observe and process geographic information data through two dimensions at the same time.
Therefore,in order to make full use of the advantages of B/S architecture and improve its shortcomings,this paper presents a concept,that integration of2D and3D in WebGIS,and studies the2D and3D WebGIS display technology based on B/S architecture.
The research work of this paper mainly includes:
1.Studies the WebGIS visualization technology and graphics rendering technology, explains the source code of Cesium and OpenLayers3in detail,analyzes how the map class library realizes the function of displaying and processing the geographic information data, lay the foundation of realization for the integration of2D and3D.
2.In combination with the above research,through the integration of the underlying data, the interface encapsulation and the expansion of the function between Cesium and OpenLayers3,accomplish linkage of2D and3D map,synchronizedthe the display,update and analysis results of geographic data.Seamless combination with web services,achieve the goal of the integration of2D and3D in WebGIS.
3.Based on the integration work in WebGIS,this paper designed the functions of the measurement,the place names service,the map grid and so on,meet the basic needs of
WebGIS二三维一体化展示关键技术的研究与实现
users.This paper build a complete WebGIS with the function displaying and processing of geographic information.
4.After the design and implementation work of WebGIS,this paper carried out the system optimization work.We have compressed and combined static files to reduces the number of HTTP requests and the volume of requested data,used the HTTP header to achieve the browser cache strategy.Enhance the user experience when they waiting for the page to load.
The WebGIS designs and implements in this paper,is based on the cross-platform characteristics of Web technology and the map open source libraries.This system is combined with the display of geomorphological data and the display of3D geospatial terrain data,and synchronous geographic information between the2D map and3D map.This system is rich in features,easy for users to use,completed the project's intended goals.After the delivery of the system,the performance is stable,reliable,in line with user requirements,play a key role in practical engineering practice.
Keywords:Integration of2D and3D,Cesium,OpenLayers3,WebGIS
插图索引
插图索引
图2.1Web地图服务时序图 (7)
图2.2WebGL渲染流程图 (10)
图2.3图形渲染管线流程图 (13)
图2.4多光源条件下正向渲染 (14)
图2.5正向渲染方式的处理结果 (15)
图2.6地图地形可视化流程图 (19)web技术的三个关键技术
图3.1Cesium引擎结构图 (21)
图3.2Cesium中多边形绘制效果图 (23)
图3.3Cesium中几何体绘制效果图 (23)
图3.4Cesium图层铺设效果图 (24)
图3.5Cesium高程数据展示效果图 (25)
图3.6ol.source.Source组成结构图 (28)
图3.7百度地图数据请求url示例图 (29)
图3.8瓦片层级关系示意图 (29)
图3.9ol.layer.Base组成结构图 (30)
图3.10openlayers3中的control组件示例图 (31)
图4.1系统总体架构图 (33)
图4.2系统前端部分层次结构图 (35)
图4.3二三维一体化数据同步流程图 (37)
图4.4视口相机成像投影示意图 (39)
图4.5地球纬度及纬线示意图 (40)
图4.6目录树模块工作流程图 (41)
图4.7测量及矢量要素标注模块工作流程图 (43)
图4.8地理网格模块工作流程图 (44)
图4.9地理网格绘制工作流程图 (46)
图4.10WFS地名搜索工作流程图 (47)
图5.1二三维一体化地图数据同步功能类图 (49)
图5.2二三维一体化相机视口同步流程图 (52)
图5.3二三维一体化相机视口同步功能类图 (52)
图5.4二三维一体化功能实现效果图 (54)
图5.5目录树模块类图 (55)
WebGIS二三维一体化展示关键技术的研究与实现
图5.6目录树模块图层功能菜单实现效果图 (57)
图5.7目录树模块搜索功能实现效果图 (58)
图5.8测量及矢量要素标注模块类图 (58)
图5.9矢量要素弹窗功能实现效果图 (60)
图5.10矢量要素标注功能实现效果图 (61)
图5.11矢量要素标注功能图形绘制实现效果图 (61)
图5.12测量模块面积测量功能实现效果图 (62)
图5.13地理网格模块类图 (62)
图5.14地理网格模块实现效果图 (64)
图5.15WFS地名服务模块类图 (64)
图5.16WFS地名服务搜索功能实现效果图 (66)
图5.17WFS地名服务搜索结果定位实现效果图 (66)
图5.18HTTP请求JavaScript文件压缩前后对比图 (67)
图5.19HTTP请求CSS文件压缩前后对比图 (68)
图5.20HTTP请求图片文件压缩前后对比图 (68)
图5.21JavaScript文件延迟加载示例图 (69)
图5.22HTTP请求静态文件响应头示例图 (70)
图5.23浏览器请求静态文件资源流程图 (71)
图5.24Gzip压缩效果对比图 (72)