3

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

<ows:OperationsMetadata>
   <!-- ... -->
   <ows:Operation name="GetTile">
      <ows:DCP>
         <ows:HTTP>
            <ows:Get xlink:href="https://tile.osm.ch/switzerland/">
               <ows:Constraint name="GetEncoding">
                  <ows:AllowedValues>
                     <ows:Value>KVP</ows:Value>
                  </ows:AllowedValues>
               </ows:Constraint>
            </ows:Get>
         </ows:HTTP>
      </ows:DCP>
   </ows:Operation>
</ows:OperationsMetadata>

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

<Contents>
   <Layer>
      <ows:Title>My Map</ows:Title>
      <ows:Identifier>mymap</ows:Identifier>
      <ows:WGS84BoundingBox crs="urn:ogc:def:crs:OGC:2:84" dimensions="2">
         <ows:LowerCorner>-180 -85.051128779807</ows:LowerCorner>
         <ows:UpperCorner>180 85.051128779807</ows:UpperCorner>
      </ows:WGS84BoundingBox>
      <Style isDefault="true">
         <ows:Identifier>default</ows:Identifier>
      </Style>
      <Format>image/png</Format>
      <TileMatrixSetLink>
         <TileMatrixSet>SOSM standard</TileMatrixSet>
      </TileMatrixSetLink>
      <ResourceURL format="image/png" resourceType="tile" template="https://example.com/map/{TileMatrix}/{TileCol}/{TileRow}.png" />
   </Layer>
   <!-- ... -->
</Contents>

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

3

If your GetTile operation includes

<ows:AllowedValues>
    <ows:Value>KVP</ows:Value>
</ows:AllowedValues>

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.

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.