Problem with WMTS TileMatrix-values in some viewers
Some viewers (like the Geocortex Silverlight Viewer and arcgis.com) won't show wmts-tilesets because of a discrepancy in the capabilities provided by mapcache. These viewers expect a TileMatrix-value in a TileMatrixSetLink to be the same as/correspond with the ows:Identifier-value for the TileMatrix in the TileMatrixSet.
@rillat, it would be helpful if you could post a diff between a working and failing capabilities document.
I don't have a full working capabilities document.
Currently the capabilities are like this:
... <TileMatrixSetLink> <TileMatrixSet>GoogleMaps</TileMatrixSet> <TileMatrixSetLimits> <TileMatrixLimits> <TileMatrix>GoogleMaps:0</TileMatrix> <MinTileRow>0</MinTileRow> <MaxTileRow>0</MaxTileRow> <MinTileCol>0</MinTileCol> <MaxTileCol>0</MaxTileCol> </TileMatrixLimits> ... <TileMatrixSet> <ows:Identifier>GoogleMaps</ows:Identifier> <ows:BoundingBox crs="urn:ogc:def:crs:EPSG:6.3:3857"> <ows:LowerCorner>-20037508.342789 -20037508.342789</ows:LowerCorner> <ows:UpperCorner>20037508.342789 20037508.342789</ows:UpperCorner> </ows:BoundingBox> <ows:SupportedCRS>urn:ogc:def:crs:EPSG:6.3:3857</ows:SupportedCRS> <WellKnownScaleSet>urn:ogc:def:wkss:OGC:1.0:GoogleMapsCompatible</WellKnownScaleSet> <TileMatrix> <ows:Identifier>0</ows:Identifier> <ScaleDenominator>559082264.02871787548065185547</ScaleDenominator> <TopLeftCorner>-20037508.342789 20037508.342789</TopLeftCorner> <TileWidth>256</TileWidth> <TileHeight>256</TileHeight> <MatrixWidth>1</MatrixWidth> <MatrixHeight>1</MatrixHeight> </TileMatrix> ...
As pointed out to me by users of the viewers mentioned above it should be like this:
... <TileMatrixSetLink> <TileMatrixSet>GoogleMaps</TileMatrixSet> <TileMatrixSetLimits> <TileMatrixLimits> <TileMatrix>0</TileMatrix> <MinTileRow>0</MinTileRow> <MaxTileRow>0</MaxTileRow> <MinTileCol>0</MinTileCol> <MaxTileCol>0</MaxTileCol> </TileMatrixLimits> ... <TileMatrixSet> <ows:Identifier>GoogleMaps</ows:Identifier> <ows:BoundingBox crs="urn:ogc:def:crs:EPSG:6.3:3857"> <ows:LowerCorner>-20037508.342789 -20037508.342789</ows:LowerCorner> <ows:UpperCorner>20037508.342789 20037508.342789</ows:UpperCorner> </ows:BoundingBox> <ows:SupportedCRS>urn:ogc:def:crs:EPSG:6.3:3857</ows:SupportedCRS> <WellKnownScaleSet>urn:ogc:def:wkss:OGC:1.0:GoogleMapsCompatible</WellKnownScaleSet> <TileMatrix> <ows:Identifier>0</ows:Identifier> <ScaleDenominator>559082264.02871787548065185547</ScaleDenominator> <TopLeftCorner>-20037508.342789 20037508.342789</TopLeftCorner> <TileWidth>256</TileWidth> <TileHeight>256</TileHeight> <MatrixWidth>1</MatrixWidth> <MatrixHeight>1</MatrixHeight> </TileMatrix> ...
...
@rillat please confirm that the provided fix is OK
Fix makes WMTS unusable in Qgis. Further investigation is needed into why the mentioned viewers don't accept the mapcache WMTS.