**Web Map Tile Services for Spatial Data Infrastructures: Management and Optimization**

Ricardo García, Juan Pablo de Castro, Elena Verdú, María Jesús Verdú and Luisa María Regueras

Additional information is available at the end of the chapter

http://dx.doi.org/10.5772/46129

### **1. Introduction**

24 Cartography – A Tool for Spatial Analysis

Wuhan University, 33(6): 623-626. (in Chinese)

[11] Whittaker C E (1902). Modern Analysis. Cambridge. [12] Peter O (2008). The Mercator Projections. Edinburgh.

Numbers. Survey Review, 30(237): 325-342.

of Engineering, Wuhan. (in Chinese)

Versicherungswesen, 118(3): 106-115.

[9] Li Houpu, Bian Shaofeng (2008). Derivation of Inverse Expansions for Auxiliary Latitudes by Hermite Interpolation Method. Geomatics and Information Science of

[10] Li Houpu (2010). The Research of the Precise Computation Theory and Its Application Based on Computer Algebra System for Geodetic Coordinate System. Naval University

[13] Bowring B R (1990). The Transverse Mercator Projection-a Solution by Complex

[14] Klotz J (1993). Eine Analytische Loesung der Gauss-Krüger-Abbildung. Zeitschrift für

Web mapping has become a popular way of distributing online mapping through the Internet. Multiple services, like the popular Google Maps or Microsoft Bing Maps, allow users to visualize cartography by using a simple Web browser and an Internet connection. However, geographic information is an expensive resource, and for this reason standardization is needed to promote its availability and reuse. In order to standardize this kind of map services, the Open Geospatial Consortium (OGC) developed the Web Map Service (WMS) recommendation [1]. This standard provides a simple HTTP interface for requesting geo-referenced map images from one or more distributed geospatial databases. It was designed for custom maps rendering, enabling clients to request exactly the desired map image. This way, clients can request arbitrary sized map images to the server, superposing multiple layers, covering an arbitrary geographic bounding box, in any supported coordinate reference system or even applying specific styles and background colors.

However, this flexibility reduces the potential to cache map images, because the probability of receiving two exact map requests is very low. Therefore, it forces images to be dynamically generated on the fly each time a request is received. This involves a very time-consuming and computationally-expensive process that negatively affects service scalability and users' Quality of Service (QoS).

A common approach to improve the cachability of requests is to divide the map into a discrete set of images, called tiles, and restrict user requests to that set [2]. Several specifications have been developed to address how cacheable image tiles are advertised from server-side and how a client requests cached image tiles. The Open Source Geospatial Foundation (OSGeo) developed the WMS Tile Caching (usually known as WMS-C) proposal [3]. Later, the OGC released the Web Map Tile Service Standard (WMTS) [4] inspired by the former and other similar initiatives.

©2012 García et al., licensee InTech. This is an open access chapter distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. ©2012 García et al., licensee InTech. This is a paper distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### 2 Will-be-set-by-IN-TECH 26 Cartography – A Tool for Spatial Analysis Web Map Tile Services for Spatial Data Infrastructures: Management and Optimization <sup>3</sup>

Most popular commercial services, like Google Maps, Yahoo Maps or Microsoft Virtual Earth, have already shown that significant performance improvements can be achieved by adopting this methodology, using their custom tiling schemes.

For example, Microsoft Bing Maps uses a tiling scheme where the first level allows representing the whole world in four tiles (2x2) of 256x256 pixels. The next level represents the whole world in 16 tiles (4x4) of 256x256 pixels and so on in powers of 4. A comprehensive

Web Map Tile Services for Spatial Data Infrastructures: Management and Optimization 27

Given the exponential nature of the scale pyramid, the resource consumption to store map tiles results often prohibitive for many providers when the cartography covers a wide geographic area for multiple scales. Consider for example that Google's BigTable, which contains the high-resolution satellite imagery of the world's surface as shown in Google Maps and Google

Besides the storage of map tiles, many caching systems also maintain metadata associated to each individual tile, such as the time when it was introduced into the cache, the last access to that object, or the number of times it has been requested. This information can then be used to improve the cache management; for example, when the cache is out of space, the LRU (*Least Recently Used*) replacement policy uses the last access time to discard the least recently used

However, the space required to store the metadata associated to a given tile may only differ by two or three orders of magnitude to the one necessary to store the actual map image object. Therefore, it is not usually feasible to work with the statistics of individual tiles. To alleviate this problem, a simplified model has been proposed by different researchers. This model groups the statistics of adjacent tiles into a single object [7]. A grid is defined so all objects inside the same grid section are combined into a single one. The pyramidal structure of scales is therefore transformed in some way in a prism-like structure with the same number of items

In order to deal with this complexity some cache management algorithms have been created. However, the efficiency of the designed algorithms usually depends on the service's workload. Because of this, prior to diving into the details of the cache management policies, a workload characterization of the WMS services need to be shown. Lets take some real-life examples for such characterization: trace files from two different tiled web map services, Cartociudad1 and IDEE-Base2, provided by the National Geographic Institute (IGN)3 of

Cartociudad is the official cartographic database of the Spanish cities and villages with their streets and roads networks topologically structured, while IDEE-Base allows viewing the

Available trace files were filtered to contain only valid web map requests according to the WMS-C recommendation. Traces from Cartociudad comprise a total of 2.369.555 requests

study on tiling schemes can be found in [2].

Earth, contained approximately 70 terabytes of data in 2006 [6].

**2.1. Simplified model**

items first.

in all the scales.

**3. Web Map Server workload**

Spain, are presented in this chapter.

<sup>3</sup> http://www.ign.es/ign/main/index.do?locale=en

<sup>1</sup> http://www.cartociudad.es <sup>2</sup> http://www.idee.es

Numeric Cartographic Base 1:25,000 and 1:200,000 of the IGN.

The potential of tiled map services is that map image tiles can be cached at any intermediate location between the client and the server, reducing the latency associated to the image generation process. Tile caches are usually deployed server-side, serving map image tiles concurrently to multiple users. Moreover, many mapping clients, like Google Earth or Nasa World Wind, have embedded caches, which can also reduce network congestion and network delay.

This chapter deals with the algorithms that allow the optimization and management of these tile caches: population strategies (*seeding*), tile pre-fetching and cache replacement policies.
