Operation request encoding Change Requests | OGC

50 Copyright © 2010 Open Geospatial Consortium Inc. Any server wishing to support KVP requests SHALL declare its support by providing an OperationsMetadata section in its ServiceMetadata document with an Operation section for each supported operation and a section for each supported HTTP request type, GET or POST, in which KVP is declared as an AllowedValue, as explained in subclause 7.1.1.1.1. An example of this practice, declaring support for GetCapabilities operations using KVP with HTTP GET, can be seen in subclause 8.1.3.

8.1 GetCapabilities

WMTS servers may support KVP requests for a representation of the ServiceMetadata document by declaring support for and correctly handling GetCapabilities requests.

8.1.1 GetCapabilities request HTTP KVP encoding

A client performs a GetCapabilities operation using KVP over HTTP by sending a GET or POST HTTP message with the request parameter set to GetCapabilities.

8.1.2 GetCapabilities request HTTP KVP encoding example

To request a WMTS ServiceMetadata document, a client could issue the following KVP- encoded GetCapabilities operation request with minimal contents: http:www.maps.bobmaps.cgi?service=WMTSversion=1.0.0 request=GetCapabilities

8.1.3 GetCapabilities HTTP KVP encoding response

In response to a valid GetCapabilities request from a client, a WMTS server SHALL send a ServiceMetadata document which conforms with the XML schema defined in Annex B.

8.1.4 GetCapabilities HTTP KVP encoding response example

In response to a valid GetCapabilities operation request in KVP encoding, a WMTS server might generate a document that looks like the one in subclause 7.1.1.3. The following fragment declares support for KVP encoded GetCapabilities operations using HTTP GET: ... ows:OperationsMetadata ows:Operation name = GetCapabilities ows:DCP ows:HTTP ows:Get xlink:href = http:www.maps.bobmaps.cgi? ows:Constraint name = GetEncoding ows:AllowedValues ows:Value KVP ows:Value ows:AllowedValues ows:Constraint ows:Get ows:HTTP ows:DCP Copyright © 2010 Open Geospatial Consortium Inc. 51 ows:Operation ...

8.2 GetTile

WMTS servers may support KVP requests for representations of image Tiles by declaring support for and correctly handling GetTile requests.

8.2.1 GetTile request HTTP KVP encoding

Servers may implement HTTP GET transfer of the GetTile operation request, using KVP encoding. The KVP encoding of the GetTile operation request SHALL use the parameters specified in Table 29 which follows the abstract description specified in Table 22 above. Table 29 — GetTile operation request URL parameters Name and example a Optionality and use Definition and format Service=WMTS Mandatory Service type identifier Request=GetTile Mandatory Operation name Version=1.0.0 Mandatory Standard and schema version for this operation Layer Mandatory Layer identifier Style Mandatory Style identifier Format Mandatory Output format of tile Sample dimensions b Optional Value allowed for this dimension TileMatrixSet Mandatory TileMatrixSet identifier TileMatrix Mandatory TileMatrix identifier TileRow Mandatory Row index of tile matrix TileCol Mandatory Column index of tile matrix a All parameter names are here listed using mostly lower case letters. However, any parameter name capitalization SHALL be allowed in KVP encoding, see subclause 11.5.2 of OWS Common [OGC 06-121r3]. b Names for these parameters SHALL be the names indicated in the ServiceMetadata document. Typical examples are Time, Elevation and Band. Parameters in a GetTile request may be specified in any order. However, in order to facilitate the caching mechanisms already available on the web, the parameters SHOULD be specified in the exact order that appears in Table 29.

8.2.2 GetTile request HTTP KVP encoding example

An example GetTile operation request KVP encoded for HTTP GET is: http:www.maps.bobmaps.cgi?service=WMTSrequest=GetTileversion=1.0.0 layer=etopo2style=defaultformat=imagepngTileMatrixSet= WholeWorld_CRS_84 TileMatrix=10mTileRow=1TileCol=3