为了对WebGIS遗留系统进行平滑升级,提高传统WebGIS服务器的响应速度和改善用户体验,设计并实现了一个瓦片地图服务中间件(Tile Map Service,TMS,又译为缓存服务)。通过分析其工作原理和体系结构,从瓦片空间索引、瓦片切图策略及系统部署等三个方面,给出了优化对策,并与传统WMS进行了性能对比。实验测试数据采用世界地图的第8缩放级别,在该缩放级别下地图瓦片总数为32768个,随机生成21000个包含3×3个瓦片的地图请求窗口,将随机生成的测试数据分成20组,每组依次包含100-2000个请求窗口。实验分别采用WMS请求和TMS请求两种请求方式,其中,WMS请求直接向GeoServer发送WMS数据请求,TMS请求采用多线程同时向瓦片地图服务中间件发送9个WMS瓦片请求。实验结果表明,该瓦片地图服务中间件比WMS的平均响应时间减少约46%,并具有很高的瓦片动态切图效率,对提高传统WebGIS的响应速度和平滑升级现有遗留系统具有重要的应用价值。
With the boom of Google Map,Virtual Earth,OpenStreetMap and other free online map services based on Web 2.0,and because of its simple,user-friendly,data-rich,and smooth access,tile map services based on pre-generated techniques are becoming a de facto standard for the new generation of WebGIS,and have posed great challenges to traditional WebGIS.In order to upgrade the WebGIS legacy systems smoothly,and improve the response speed of traditional WebGIS and user experience,this paper designs and develops a tile map service based on middleware technology.Through systematic analysis of its basic principle and system architecture,this paper gives three optimization strategies which are tile spatial index,tiling strategies and the deployment structure.Finally,we make a performance comparison between tile map service middleware and traditional OGC(Open Geospatial Consortium,OGC) standard WMS service.Experimental test data using the world map zoom level 8,under this zoom level there are 32,768 tiles in total,then randomly generated 21,000 request windows which contains 3×3 tiles,and this randomly generated test data are divided into 20 groups,each contains 100 to 2000 request windows successively.We use two kinds of experiments,the first one is sent WMS request directly to a Local GeoServer which hosts WMS services,and the other one is our tile map service middleware which uses multiple threads and simultaneously sends nine tile map requests to TMS middleware.Our experimental results show that comparing with sending WMS request to WMS server directly,the average response time of tile map service reduced by 46%.And the TMS middleware has a high efficiency when cutting map tiles dynamically because of its meta-tiling strategy.The study shows that the tile map service middleware has important application value both in improving traditional WebGIS performance and in upgrading existing legacy systems.