[gdal-dev] Any plans for a GDAL WMTS driver?

Even Rouault even.rouault at mines-paris.org
Sat Jul 7 03:58:33 PDT 2012


Le samedi 07 juillet 2012 08:45:33, Jukka Rahkonen a écrit :
> Hi,
> 
> National Land Survey of Finland has opened an experimental WMTS service.
> GetCapabolities is found from
> http://karttatiili.fi/dataset/taustakarttasarja/capabilities/wmts.xml??REQU
> EST=GetCapabilities Unfortunately GDAL does not have a WMTS driver yet. Are
> there any plans for making such?

This is something I've also thought to. At first sight WMTS shouldn't be so 
different of other tiled protocols (WMS-C, TMS, etc..), but there's an annoying 
difficulty : in WMTS, the different overview levels have not necessarily the same 
spatial extent (in the server you are mentionning, this seems to be indeed the 
case (*)), which doesn't fit natively into the GDAL model. An idea would be to 
take into account the tiling scheme and spatial extent of the most precise 
level, and use perhaps a in-memory VRT to do on-the-fly clipping of the 
overview levels. But that doesn't fit very well in the architecture of the 
"minidrivers" of the WMS driver.


(*)

You can see it by downloading the 4 following tiles at level 10 :

http://kansalaisen.karttatiili.fi/dataset/taustakarttasarja/service/wmts?STYLES=_null&SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=taustakartta_10k&STYLE=_null&TILEMATRIXSET=EPSG_3067_MML&TILEMATRIX=EPSG_3067_MML%3A10&TILEROW=10000&TILECOL=1500&FORMAT=image%2Fpng
http://kansalaisen.karttatiili.fi/dataset/taustakarttasarja/service/wmts?STYLES=_null&SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=taustakartta_10k&STYLE=_null&TILEMATRIXSET=EPSG_3067_MML&TILEMATRIX=EPSG_3067_MML%3A10&TILEROW=10000&TILECOL=1501&FORMAT=image%2Fpng
http://kansalaisen.karttatiili.fi/dataset/taustakarttasarja/service/wmts?STYLES=_null&SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=taustakartta_10k&STYLE=_null&TILEMATRIXSET=EPSG_3067_MML&TILEMATRIX=EPSG_3067_MML%3A10&TILEROW=10001&TILECOL=1500&FORMAT=image%2Fpng
http://kansalaisen.karttatiili.fi/dataset/taustakarttasarja/service/wmts?STYLES=_null&SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=taustakartta_10k&STYLE=_null&TILEMATRIXSET=EPSG_3067_MML&TILEMATRIX=EPSG_3067_MML%3A10&TILEROW=10001&TILECOL=1501&FORMAT=image%2Fpng

And then the one that, in a classical tiling scheme, should cover the same 
area at level 9 :

http://kansalaisen.karttatiili.fi/dataset/taustakarttasarja/service/wmts?STYLES=_null&SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=taustakartta_10k&STYLE=_null&TILEMATRIXSET=EPSG_3067_MML&TILEMATRIX=EPSG_3067_MML%3A9&TILEROW=5000&TILECOL=750&FORMAT=image%2Fpng

But if you reassemble the 4 tiles of level 10, you'll see that the tile of 
level 9 is located at the north, with a shift of the height of a tile of level 
10.

This indeed comes from the TileMatrix definition, where one can see that the 
top of each level is not the same. And indeed, as 
ScaleDenominator=7142.857142857143 is equivalent to 2 m and 
ScaleDenominator=3571.4285714285716 is equivalent to 1 m, one can see that the 
tile at row=0 at level 10 is at the half of tile at row = 0 at level 9.

    <TileMatrix>
      <ows:Identifier>EPSG_3067_MML:9</ows:Identifier>
      <ScaleDenominator>7142.857142857143</ScaleDenominator>
      <TopLeftCorner>0.0 1.0000384E7</TopLeftCorner>
      <TileWidth>256</TileWidth>
      <TileHeight>256</TileHeight>
      <MatrixWidth>19532</MatrixWidth>
      <MatrixHeight>19532</MatrixHeight>
    </TileMatrix>
    <TileMatrix>
      <ows:Identifier>EPSG_3067_MML:10</ows:Identifier>
      <ScaleDenominator>3571.4285714285716</ScaleDenominator>
      <TopLeftCorner>0.0 1.0000128E7</TopLeftCorner>
      <TileWidth>256</TileWidth>
      <TileHeight>256</TileHeight>
      <MatrixWidth>39063</MatrixWidth>
      <MatrixHeight>39063</MatrixHeight>
    </TileMatrix>

> 
> -Jukka Rahkonen-
> 
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev


More information about the gdal-dev mailing list