Difference between revisions of "Tile Map Service Specification"

From OSGeo
Jump to: navigation, search
(Change tile name format to path/x/y.ext)
(Headings)
Line 1: Line 1:
==Document Scope==
+
==Introduction==
 +
 
 +
===Document Scope===
  
 
This standard specifies the behavior of a service that provides access to georeferenced maps in the form of a regularly spaced set of regularly sized squares at a finite number of scales.  This standard specifies operations to retrieve a computer-readable description of the service instance and to retrieve particular tiles.
 
This standard specifies the behavior of a service that provides access to georeferenced maps in the form of a regularly spaced set of regularly sized squares at a finite number of scales.  This standard specifies operations to retrieve a computer-readable description of the service instance and to retrieve particular tiles.
Line 5: Line 7:
 
A Tile Map Service provides access to cartographic maps of geo-referenced data, not direct access to the data itself.  This document standardizes the way in which map tiles are requested by clients, and the ways that servers describe their holdings.  
 
A Tile Map Service provides access to cartographic maps of geo-referenced data, not direct access to the data itself.  This document standardizes the way in which map tiles are requested by clients, and the ways that servers describe their holdings.  
  
==Document Form==
+
===Document Form===
  
 
This specification will proceed from a description of general resources provided by the server to particular resources (such as map tiles) providing examples of access URLs and return values at each stage.
 
This specification will proceed from a description of general resources provided by the server to particular resources (such as map tiles) providing examples of access URLs and return values at each stage.
  
==Resources==
+
==Specification==
  
 
The Tiled Web Service provides access to resources, in particular, to rendered cartographic tiles at fixed scales.  Access to these resources is provided via a "REST" interface, starting with a root resource describing available layers, then map resources with a set of scales, then scales holding sets of tiles.   
 
The Tiled Web Service provides access to resources, in particular, to rendered cartographic tiles at fixed scales.  Access to these resources is provided via a "REST" interface, starting with a root resource describing available layers, then map resources with a set of scales, then scales holding sets of tiles.   
  
==Root Resource ==
+
===Root Resource===
  
 
The root resource describes the available versions of the <TileMapService> (and possibly other services as well).
 
The root resource describes the available versions of the <TileMapService> (and possibly other services as well).
Line 30: Line 32:
 
  </Services>
 
  </Services>
  
==TileMapService==
+
===TileMapService Resource===
  
 
The <TileMapServer> resource provides description metadata about the service and lists the available <TileMaps>.  Optional elements in the resource are called out below using the pipe character.
 
The <TileMapServer> resource provides description metadata about the service and lists the available <TileMaps>.  Optional elements in the resource are called out below using the pipe character.
Line 80: Line 82:
  
 
    
 
    
==TileMap==
+
===TileMap Resource===
  
 
A <TileMap> is a (usually) cartographically complete map representation.  Sometimes <TileMap>s are built to be used in conjunction, as a set of stacked layers, but they are generally visually complete on their own.   
 
A <TileMap> is a (usually) cartographically complete map representation.  Sometimes <TileMap>s are built to be used in conjunction, as a set of stacked layers, but they are generally visually complete on their own.   
Line 171: Line 173:
 
  </TileMap>
 
  </TileMap>
  
==Tiles==
+
===Tile Resources===
  
 
The origin of a <TileMap> is defined in the coordinates of the spatial reference system of the <TileMap>.  The x-coordinate of the tile numbers increases with the x-coordinate of the spatial reference system, and the y-coordinate of the tile numbers also increases with the y-coordinate of the spatial reference system.
 
The origin of a <TileMap> is defined in the coordinates of the spatial reference system of the <TileMap>.  The x-coordinate of the tile numbers increases with the x-coordinate of the spatial reference system, and the y-coordinate of the tile numbers also increases with the y-coordinate of the spatial reference system.
Line 189: Line 191:
  
  
==Diagram==
+
===TileMap Diagram===
  
 
(this is where a diagram of how the Origin, Bounding Box, tile numbering and so on all tie together)
 
(this is where a diagram of how the Origin, Bounding Box, tile numbering and so on all tie together)
  
 +
==Implementation Advice==
  
==Maximizing Interoperability==
+
===Maximizing Interoperability===
  
 
Using this server specification will ensure that clients can easily consume your tiled map data.  However, it will not guarantee that clients can efficiently overlay your data with data from other tile map servers.  In order to maximize the interoperability of your tile map with other tile maps, you must implement the "global profile" for your tile map.
 
Using this server specification will ensure that clients can easily consume your tiled map data.  However, it will not guarantee that clients can efficiently overlay your data with data from other tile map servers.  In order to maximize the interoperability of your tile map with other tile maps, you must implement the "global profile" for your tile map.
Line 206: Line 209:
  
  
==Maximizing Cacheability==
+
===Maximizing Cacheability===
  
 
(Using the Expires headers to ensure data gets cached and load on the server is reduced.  Expires strategies for volatile data.)
 
(Using the Expires headers to ensure data gets cached and load on the server is reduced.  Expires strategies for volatile data.)

Revision as of 20:25, 22 October 2006

Introduction

Document Scope

This standard specifies the behavior of a service that provides access to georeferenced maps in the form of a regularly spaced set of regularly sized squares at a finite number of scales. This standard specifies operations to retrieve a computer-readable description of the service instance and to retrieve particular tiles.

A Tile Map Service provides access to cartographic maps of geo-referenced data, not direct access to the data itself. This document standardizes the way in which map tiles are requested by clients, and the ways that servers describe their holdings.

Document Form

This specification will proceed from a description of general resources provided by the server to particular resources (such as map tiles) providing examples of access URLs and return values at each stage.

Specification

The Tiled Web Service provides access to resources, in particular, to rendered cartographic tiles at fixed scales. Access to these resources is provided via a "REST" interface, starting with a root resource describing available layers, then map resources with a set of scales, then scales holding sets of tiles.

Root Resource

The root resource describes the available versions of the <TileMapService> (and possibly other services as well).

Request:

http://tms.osgeo.org/

Response:

<?xml version="1.0" encoding="UTF-8" ?>
<Services>
  <TileMapService version="1.0.0" href="http://tms.osgeo.org/1.0.0/" />
  <TileMapService version="1.1.0" href="http://tms.osgeo.org/1.1.0/" />
  <FancyFeatureService version="0.9" href="http://ffs.osgeo.org/0.9/" />
</Services>

TileMapService Resource

The <TileMapServer> resource provides description metadata about the service and lists the available <TileMaps>. Optional elements in the resource are called out below using the pipe character.

Request:

http://tms.osgeo.org/1.0.0/

Response:

<?xml version="1.0" encoding="UTF-8" ?>
<TileMapService version="1.0.0">
  <Title>Example Tile Map Service</Title>
  <Abstract>This is a longer description of the example tiling map service.</Abstract>
| <KeywordList>example tile service</KeywordList>
| <ContactInformation>
|   <ContactPersonPrimary>
|     <ContactPerson>Paul Ramsey</ContactPerson>
|     <ContactOrganization>Refractions Research</ContactOrganization>
|   </ContactPersonPrimary>
|   <ContactPosition>Manager</ContactPosition>
|   <ContactAddress>
|     <AddressType>postal</AddressType>
|     <Address>300 - 1207 Douglas Street</Address>
|     <City>Victoria</City>
|     <StateOrProvince>British Columbia</StateOrProvince>
|     <PostCode>V8W2E7</PostCode>
|     <Country>Canada</Country>
|   </ContactAddress>
|   <ContactVoiceTelephone>12503833022</ContactVoiceTelephone>
|   <ContactFacsimileTelephone>12503832140</ContactFacsimileTelephone>
|   <ContactElectronicMailAddress>pramsey@refractions.net</ContactElectronicMailAddress>
| </ContactInformation>
  <TileMaps>
    <TileMap 
      href="http://tms.osgeo.org/1.0.0/vmap0/" 
      srs="EPSG:4326"
      global-profile="1">
      VMAP0 World Map
    </TileMap>
    <TileMap 
      href="http://tms.osgeo.org/1.0.0/landsat2000/"
      srs="EPSG:3005"
      global-profile="0">
      British Columbia Landsat Imagery (2000)
    </TileMap>
  </TileMaps>
</TileMapService> 


TileMap Resource

A <TileMap> is a (usually) cartographically complete map representation. Sometimes <TileMap>s are built to be used in conjunction, as a set of stacked layers, but they are generally visually complete on their own.

<TileMap>s are composed of a set of scale-appropriate cartographic renderings, each divided up into regularly spaced image tiles, called <TileSet>s. Small-scale (eg, 1:10000000) tile sets may only contain a handful of tiles. Large-scale tile sets (eg, 1:10000) may contain millions of tiles.

At a particular scale, and in a particular cartographic projection, a <TileMape> is represented by a <TileSet>, a coverage of regularly sized and spaced images that taken together form a complete visual representation of the entire area of coverage of the <TileMap>.

Each <TileMap> supports one <SRS> and one image format. To support more than one SRS or image format, define extra <TileMaps> in your <TileMapService> for each combination you want.

Optional metadata elements are called out in the resource below with the pipe character.

Request:

 http://tms.osgeo.org/vmap0/

Response:

<?xml version="1.0" encoding="UTF-8" ?>
<TileMap tilemapservice="http://tms.osgeo.org/1.0.0/">
  <Title>VMAP0 World Map</Title>
  <Abstract>A map of the world built from the NGA VMAP0 vector data set.</Abstract>
| <KeywordList></KeywordList>
|   <MetadataURL type="TC211">
|     <Format>text/xml</Format>
|     <OnlineResource href="http://www.org" />
|   </MetadataURL>
|   <Attribution>
|     <Title></Title>
|     <OnlineResource />
|     <LogoURL width="10" height="10">
|       <Format>image/gif</Format>
|       <OnlineResource href="http://www.org" />
|     </LogoURL>
|   </Attribution>
|   <WebMapServerURL>
|     <OnlineResource href="http://wms.org" />
|   </WebMapServerURL>
  <SRS>EPSG:4326</SRS>
  <BoundingBox minx="-180" miny="-90" maxx="180" maxy="90" />
  <Origin x="-180" y="-180">
  <TileFormat width="256" height="256" mime-type="image/jpeg" extension="jpg" />
  <TileSets>
    <TileSet href="http://tms.osgeo.org/1.0.0/vmap0/levelzero" units-per-pixel="0.703125" order="0" />
    <TileSet href="http://tms.osgeo.org/1.0.0/vmap0/levelone" units-per-pixel="0.3515625" order="1" />
    <TileSet href="http://tms.osgeo.org/1.0.0/vmap0/leveltwo" units-per-pixel="0.17578125" order="2" />
    <TileSet href="http://tms.osgeo.org/1.0.0/vmap0/levelthree" units-per-pixel="0.08789063" order="3" />
  </TileSets>
</TileMap>


Request:

http://tms.osgeo.org/landsat2000/

Response:

<?xml version="1.0" encoding="UTF-8" ?>
<TileMap tilemapservice="http://tms.osgeo.org/1.0.0/">
  <Title>British Columbia Landsat Imagery (2000)</Title>
  <Abstract>Landsat data collected in the year 2000 over British Columbia.</Abstract>
| <KeywordList></KeywordList>
|   <MetadataURL type="TC211">
|     <Format>text/xml</Format>
|     <OnlineResource href="http://www.org/" />
|   </MetadataURL>
|   <Attribution>
|     <Title></Title>
|     <OnlineResource />
|     <LogoURL width="10" height="10">
|       <Format>image/gif</Format>
|       <OnlineResource href="http://www.org/" />
|     </LogoURL>
|   </Attribution>
|   <WebMapServerURL>
|     <OnlineResource xlink:href="http://wms.org/" />
|   </WebMapServerURL>
  <SRS>EPSG:3005</SRS>
  <BoundingBox minx="100000" miny="100000" maxx="1800000" maxy="1800000" />
  <Origin x="100000" y="100000">
  <TileFormat width="256" height="256" mime-type="image/png" extension="png" />
  <TileSets>
    <TileSet href="http://tms.osgeo.org/1.0.0/landsat2000/32" units-per-pixel="3200" order="0" />
    <TileSet href="http://tms.osgeo.org/1.0.0/landsat2000/16" units-per-pixel="1600" order="1" />
    <TileSet href="http://tms.osgeo.org/1.0.0/landsat2000/8" units-per-pixel="800" order="2" />
    <TileSet href="http://tms.osgeo.org/1.0.0/landsat2000/4" units-per-pixel="400" order="3" />
    <TileSet href="http://tms.osgeo.org/1.0.0/landsat2000/2" units-per-pixel="200" order="4" />
    <TileSet href="http://tms.osgeo.org/1.0.0/landsat2000/1" units-per-pixel="100" order="5" />
  </TileSets>
</TileMap>

Tile Resources

The origin of a <TileMap> is defined in the coordinates of the spatial reference system of the <TileMap>. The x-coordinate of the tile numbers increases with the x-coordinate of the spatial reference system, and the y-coordinate of the tile numbers also increases with the y-coordinate of the spatial reference system.

Tiles are addressed under the "href" specified in the <TileSet> appending the "x" tile coordinate as a directory name and using the "y" tile coordinate as the file name, with the file "extension" from the <TileFormat>.

Example:

The tile at the origin of the tile set in the first zoom level of vmap0.
http://tms.osgeo.org/1.0.0/vmap0/levelzero/0/0.jpg
The tile near the middle of the tile set in the third zoom level of vmap0.
http://tms.osgeo.org/1.0.0/vmap0/leveltwo/3/4.jpg
The tile near the middle of the tile set in the fifth zoom level of landsat2000.
http://tms.osgeo.org/1.0.0/landsat2000/1/8500/8500.png


TileMap Diagram

(this is where a diagram of how the Origin, Bounding Box, tile numbering and so on all tie together)

Implementation Advice

Maximizing Interoperability

Using this server specification will ensure that clients can easily consume your tiled map data. However, it will not guarantee that clients can efficiently overlay your data with data from other tile map servers. In order to maximize the interoperability of your tile map with other tile maps, you must implement the "global profile" for your tile map.

(Services implementing the "global profile" should be flagged as such by setting the "global-profile" attribute in the <TileMap> element of the <TileMapService> resource to "1".)

In order to conform to the "global profile" a TileMap must meet the following requirements:

  • Must use <SRS>EPSG:4326</SRS>
  • Must provide <TileSet>s with units-per-pixel meeting the following formula for any integral value of "n" greater than or equal to 0: units-per-pixel = 0.703125 / 2^n


Maximizing Cacheability

(Using the Expires headers to ensure data gets cached and load on the server is reduced. Expires strategies for volatile data.)