Sunday, 20 January 2019

ogc - WMTS: declare "GetTile" operation for statically hosted tiles?


Supposedly, one can turn a collection of static tiles, hosted according to the ZXY schema also used by OpenStreetMap tiles and Google Maps tiles, into a standard-conformant OGC WMTS by accompanying it by an (also static) WMTSCapabilities.xml file for satisfying the GetCapabilities WMTS operation. (See also question GET encoding for static WMTSCapabilities.xml.)


Amongst others, that XML document should describe how tiles can be obtained with parametrized URLs. If the tiles are only available at URLs like (say) https://example.com/map/1/2/3.png (this one being for zoomlevel 1, tile column 2, tile row 3) but not at any URLs like


https://example.com/map.cgi?service=WMTS&request=GetTile&version=1.0.0&layer=example&style=default&format=image/png&TileMatrixSet=WholeWorld_CRS_84&TileMatrix=1&TileRow=2&TileCol=3

then should the ows:OperationsMetadata have an entry for the GetTile operation like











KVP









or should only the ResourceURL elements of the respective Layer elements specify how to obtain tiles? The latter looks like





My Map
mymap

-180 -85.051128779807
180 85.051128779807


image/png


SOSM standard






, so template="https://example.com/map/{TileMatrix}/{TileCol}/{TileRow}.png" specifies where to find the tile, anyway.



Answer




If your GetTile operation includes



KVP


then you have to respond correctly to a KVP GET request or you are violating the standard.


If you plan on being a REST-only WMTS, then you should not offer a GetTile or GetFeatureInfo request in your capabilities.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...