[gdal-dev] Re: Status of (WMS) tiling specification at OGC and OSGEO?

Klokan Petr Přidal klokan at klokan.cz
Sun Aug 10 16:58:00 EDT 2008


Hello everybody,

I try to describe the difference between specifications (it is
simplified a bit).

If we will speak about the most wanted tiles for "Spherical Mercator"
(EPSG:900913/EPSG:3785
http://spatialreference.org/ref/user/epsg900913/), the key is
compatibility with Google Maps and similar services (Microsoft,
Yahoo), which all uses the same projection - tiles covering the same
area in the same zoom level. It means you can combine/overlay
different map-sources exactly as it is done for example in:
http://www.klokan.cz/projects/gdal2tiles/overlay/openlayers.html
(OpenLayers does the job).

It means the extent of available tiles and zoom (number of pixels per
meter) is predefined for the whole Earth. The difference between
tiling standards (OSGEO/OGC) is only in the URL you need to use to
access particular tile. Another difference is in the xml format of
metadata related to the service (think equivalent of WMS's
GetCapabilities).

TileCache.org projects implements two OSGEO standards: WMS-C and TMS.
GDAL2Tiles is a generator of tiles compatible with TMS.
Do you know about any implementations of OGC tiling standards?

OSGEO WMS-C:
-------------------------

WMS-C is a normal WMS with a recommendation for client query, there is
no extension on the standard. The server guarantee to (quickly) answer
only the requests for extents which are defined by tiling scheme (and
are therefore compatible with other tiles). Any WMS server is serving
also WMS-C, but a WMS client needs to be modified into WMS-C - to send
only requests in predefined extents. True WMS-C server (like
tilecache) is not able to return raster for any extent, only for
extents predefined by tiling profile.

More info:
http://wiki.osgeo.org/wiki/WMS_Tile_Caching
(http://wiki.osgeo.org/wiki/WMS_Tiling_Client_Recommendation)

Example (shorten) of a tile request looks like normal WMS (this is
epsg:4326 so Global Geodetic Profile):

http://labs.metacarta.com/wms-c/tilecache.py?LAYERS=basic
    &FORMAT=image/png
   &SERVICE=WMS
   &VERSION=1.1.1
   &REQUEST=GetMap
   &SRS=EPSG:4326
   &BBOX=-90,0,0,90
   &WIDTH=256
   &HEIGHT=256

OSGEO Tile Map Service - TMS:
------------------------------------------------

Tiles are requested in the REST form, so both dynamic generation (a la
tilecache.org) and pre-generation into static tiles (a la gdal2tiles)
is possible.
The geographic extent is addressed by zoom level and tile coordinates.

Documentation is at:
http://wiki.osgeo.org/wiki/Tile_Map_Service_Specification

Request looks like:

http://labs.metacarta.com/wms-c/tilecache.py/1.0.0/basic/5/32/23.png

or in general:

server-and-url/5/32/23.png
server-and-url/script.ext?var=/5/32/23.png

My notes to the TMS standard:
There is plenty of XML Metadata files, but nobody has ever used that
as I know (the are generated by tilecache, but no clients are parsing
them as I know but new Keo's GDAL TMS read driver from this year
GSoC). Origin of the tiles is bottom-left (IMHO it should be changed
to in the new version of TMS as it is causing a lot of implementation
troubles on both client and server side, some are using TMS but with
top-left origin tiles, for example OpenStreetMap. Google Maps is
naturally top-left, gdal is internally top-left, any computer raster
graphic is top-left).

OpenGIS Tiled WMS:
-------------------------------

As I know it is a suggestion for extension of the WMS standard so the
tiles are access differently, there is extension of GetCapabilities,
etc..
Tiles are access in the form (shorten):

baseUrl?SERVICE=WMS
       &REQUEST=GetTile
       &FORMAT=image/png
       &SCALE=5e6
       &TIME=2007-06
       &TILEROW=42
       &TILECOL=112

I have no clue if anybody implemented that.
Origin of tiles is top-left.
Documentation is available at:
http://portal.opengeospatial.org/files/?artifact_id=23206

Does it really bring something new, when compared to WMS-C which is
more or less only client based? I think server can make cacheing even
without changing anything on the WMS standard or not?

OpenGIS Web Map Tiling Service (WMTS)
--------------------------------------------------------------

OpenGIS is working on another service called WMTS. I think it should
be more or less the same like OSGEO TMS (I hope they are going to make
it RESTful). I haven't seen any documentation (where to get the
document: specification draft OGC 07-057r4 ?).

Other tile formats
-------------------------
There is plenty of application using tiles, both providers and
clients. Usually they define their own format.
Well known is format of Microsoft Quadkey (implemented by Virtual
Earth and by generator MapCruncher), format of NASA WorldWind
(implemented by tilecache as well) and several other. I summarized
some of them at:
http://spreadsheets.google.com/pub?key=pm3_jKEJCJ2fWv3lToe7KZA
The table could be longer, but i don't see any reason why to do that...

Comments are welcome

Klokan

P.S.
There is similarity between relation of an imageserver/zoomify and WMS/TMS.
TMS directly does not mean the the static files. I can imagine a
simplified tilecache project serving tiles directly based on TMS,
where the tiles are stored for example on Google BigTable (App Engine)
or Amazon S3 or in any other database/storage.
It would be even possible to write a patch for mapserver which will
add tms= argument and internally expand it to the standard WMS query.


More information about the gdal-dev mailing list