[gdal-dev] WMTS - Need TileLevel option Servers responding with bad capabilities

Even Rouault even.rouault at spatialys.com
Sun Dec 4 10:46:06 PST 2016

On mercredi 30 novembre 2016 12:55:57 CET esacree wrote:
> Question:  Is it possible to get a TileLevel option added to the new GDAL
> WMTS driver?
> Reason:  WMTS servers at USGS and ESRI are returning XML Capabilities with
> TileLevel 18 (Google) or TileLevel 19 (default028mm).   The USGS help desk
> said that the tile servers are only serving up to Tile Level 15.  The new
> GDAL WMTS driver always request data from the max TileLevel in the
> Capabilities.  The mismatch between the WMTS XML capabilities and the actual
> maximum TileLevel are causing the GDAL WMTS driver requests to fail with
> Error 404 (not found).
> I have requested that they correct the WMTS XML Capabilities documents.
> Suggestion:  Could a "TileLevel" parameter be added to the WMTS GDAL driver
> to limit the TileLevel to one that is available?   A TileLevel parameter
> would help work around this situation.


I've just added  in GDAL trunk TILEMATRIX / ZOOM_LEVEL open options and the 
corresponding <TileMatrix> / <ZoomLevel> elements as child of <GDAL_WMTS>


gdalinfo WMTSCapabilities_arcgis_usgs.xml -oo tilematrix=14
gdalinfo WMTSCapabilities_arcgis_usgs.xml,tilematrix=14
gdalinfo WMTSCapabilities_arcgis_usgs.xml -oo zoom_level=14 
gdalinfo WMTSCapabilities_arcgis_usgs.xml,zoom_level=14 

  <!-- or --> <ZoomLevel>0</ZoomLevel>
  <Cache />

The difference between TILEMATRIX and ZOOM_LEVEL is that the first is the value of the 
<ows:Identifier> of the <TileMatrix> in the WMTS GetCapabilities response, while the later is 
the index (starting with 0) of the <TileMatrix> to consider. Sometimes they are the same 
value (but sometimes the TileMatrix identifier is like EPSG:XXXX:zoom_level)


Spatialys - Geospatial professional services
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20161204/a5035b87/attachment.html>

More information about the gdal-dev mailing list