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

Jukka Rahkonen jukka.rahkonen at mmmtike.fi
Fri Aug 3 04:30:06 PDT 2012


Even Rouault <even.rouault <at> mines-paris.org> writes:

> 
> 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.
> 
> (*)
................
> 
> 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>


There is another national TileMatrix in the same service which 
should be easier to handle ("JHS" matrix set is an official 
recommendation for national use in Finland while "MML" mastrix 
set must be something special for internal use at the National 
land survey of Finland.)  Perhaps it would be not too bad if the
WMTS driver would support first only the simple cases with same 
TopLeftCorner values at every zoom level and resolutions multiplied 
by factor of 2 at each step. That might encourage WMTS service 
providers to avoid using the advanced flexibility of the standard,
which after all would be just good for everybody.

<TileMatrix>
     <ows:Identifier>EPSG_3067_JHS:9</ows:Identifier>
     <ScaleDenominator>1.462857142857143E7</ScaleDenominator>
     <TopLeftCorner>-548576.0 8388608.0</TopLeftCorner>
     <TileWidth>256</TileWidth>
     <TileHeight>256</TileHeight>
     <MatrixWidth>2</MatrixWidth>
     <MatrixHeight>2</MatrixHeight>
</TileMatrix>
<TileMatrix>
     <ows:Identifier>EPSG_3067_JHS:10</ows:Identifier>
     <ScaleDenominator>7314285.714285715</ScaleDenominator>
     <TopLeftCorner>-548576.0 8388608.0</TopLeftCorner>
     <TileWidth>256</TileWidth>
     <TileHeight>256</TileHeight>
     <MatrixWidth>4</MatrixWidth>
     <MatrixHeight>4</MatrixHeight>
</TileMatrix>

-Jukka-



More information about the gdal-dev mailing list