1

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.

Amongst others, this document describes how itself may be obtained:

All WMTS servers operating in a procedure oriented architecture style and using HTTP SHALL specify the message encodings that MAY be sent using HTTP GET transfer of operation requests. Specifically, an ows:Constraint parameter SHOULD be included, with "GetEncoding" as the value of the "name" attribute and specifying the values allowed:

a) The value "KVP" indicates that KVP encoding is allowed, when using HTTP GET transfer as specified in clause 8.

If I understood correctly, hosting the static WMTSCapabilities.xml at an URL like https://example.com/mymap/1.0.0/WMTSCapabilities.xml means that the request to it would not be "KVP encoded" but "RESTful encoded". However, the standard only names "KVP" as a possible value.

So, if the WMTSCapabilities.xml is only made available at https://example.com/mymap/1.0.0/WMTSCapabilities.xml, not also at e.g. https://example.com/mymap.cgi?service=WMTS&version=1.0.0&request=GetCapabilities (which would be an URL for a KVP request), should the operations metadata read

<!-- ... -->
<ows:OperationsMetadata>
   <ows:Operation name="GetCapabilities">
      <ows:DCP>
         <ows:HTTP>
            <ows:Get xlink:href="https://example.com/map/1.0.0/WMTSCapabilities.xml">
               <ows:Constraint name="GetEncoding">
                  <ows:AllowedValues>
                     <ows:Value>RESTful</ows:Value>
                  </ows:AllowedValues>
               </ows:Constraint>
            </ows:Get>
         </ows:HTTP>
      </ows:DCP>
   </ows:Operation>
   <!-- ... -->
</ows:OperationsMetadata>
<!-- ... -->

or just

<!-- ... -->
<ows:OperationsMetadata>
   <ows:Operation name="GetCapabilities">
      <ows:DCP>
         <ows:HTTP>
            <ows:Get xlink:href="https://example.com/map/1.0.0/WMTSCapabilities.xml">
               <ows:Constraint name="GetEncoding">
                  <ows:NoValues />
               </ows:Constraint>
            </ows:Get>
         </ows:HTTP>
      </ows:DCP>
   </ows:Operation>
   <!-- ... -->
</ows:OperationsMetadata>
<!-- ... -->

?

1

Referencing the examples on the OGC site see http://schemas.opengis.net/wmts/wmts-1_0_1.zip

We have: wmtsGetCapabilities_response_RESTful.xml

<?xml version="1.0" encoding="UTF-8"?>
<!-- This is an example of a GetCapabilities response that declares 
RESTful support for requesting tiles and FeatureInfo documents -->
...
<ows:OperationsMetadata>
    <ows:Operation name="GetCapabilities">
        <ows:DCP>
            <ows:HTTP>
                <ows:Get xlink:href="http://www.opengis.uab.es/cgi-bin/world/MiraMon5_0.cgi?">
                    <ows:Constraint name="GetEncoding">
                        <ows:AllowedValues>
                            <ows:Value>KVP</ows:Value>
                        </ows:AllowedValues>
                    </ows:Constraint>
                </ows:Get>
            </ows:HTTP>
        </ows:DCP>
    </ows:Operation>

In the other examples I don't see any instance of <ows:Value>RESTful</ows:Value> so probably you should discount it.

I see that this example uses .cgi? and your question is about some static file, but as in HTTP KVP unknown query parameters are ignored I think in doesn't matter.

i.e.

Both https://example.com/map/1.0.0/WMTSCapabilities.xml and https://example.com/map/1.0.0/WMTSCapabilities.xml?service=WMTS&request=GetCapabilities& will return the capabilities response document.

  • I've seen <ows:Value>RESTful</ows:Value> in files generated by wmts.maptiler.com e.g. wmts.maptiler.com/…, but as I haven't seen it in the standard, wondered whether that was allowed at all. – das-g Sep 15 '17 at 13:19
  • I've asked a related question w.r.t. GetTile at gis.stackexchange.com/q/255548/51574, in case you're interested. – das-g Sep 15 '17 at 14:23
  • Is it possible to connect to a folder hierarchy of tiles locally by defining a WMTSCapabilities.xml document at the top of that directory, and then connecting via a URL like "file://" or something? – Joebocop Feb 16 '18 at 21:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.