WTMS request

WMTS request

The Sentinel WMTS (Web Map Tile Service) service conforms to the WMTS standard.  It provides access to Sentinel-2's 13 unprocessed bands (B01 through B12, with B8A following B08) as well as processed products such as true color imagery and NDVI. Access to the service is done via a custom server instance URL which will be provided to you upon registration. Provides access to the same bands product and additional informational layers as the WMS request except only one layer can be specified at once, even when only raw Sentinel-2 bands are used. As with the WMS service, WMTS is also only available via a user-preconfigured custom server instance URL.

The base URL for the WMTS service:

http://services.sentinel-hub.com/v1/wmts/{INSTANCE_ID}

The service supports the same output formats as the WMS request and supports the standard WMTS requests GetTile, GetCapabilities. It supports WMTS version 1.0.0.

The WMTS service output image type can be a 1 or 3 component 8-bit PNG or JPEG; alternatively also an n-component 8 or 16-bit TIFF. Use the proper type when setting the "FORMAT" parameter. For JPEG, use "image/jpeg" or "image/jpg" and for PNG use "image/png". For TIFF, if you use just "image/tiff", the service will generate 8-bit TIFF for the products and 16-bit TIFF for the raw Sentinel-2 bands. If you want to force a specific TIFF bit depth, use "image/tiff;depth=8" or "image/tiff;depth=16". When PNG or TIFF is requested the "TRANSPARENT" parameter determines whether the produced image will have transparent pixels where no input data is available or not. For a list of supported coordinate reference systems check the GetCapabilities result.

Check GetCapabilities for a list of supported tile matrix sets which can be used for the TILEMATRIX and TILEMATRIXSET parameters.

WMTS parameters

Standard common WMTS URL parameters (names are case insensitive):

WMTS parameter info

SERVICE

Required, must be "WMTS".

VERSION

WMTS version standard. Optional, default: "1.0.0". Supported values: "1.0.0".

REQUEST

What is requested, valid values: GetTile or GetCapabilities. Required.

TIME

(when REQUEST = GetTile) The time or time range for which to return the results, in ISO8601 format (year-month-date, for example: 2016-01-01). When a single time is specified the service will return data until the specified time. If a time range is specified the result is based on all scenes between the specified dates conforming to the cloud coverage criteria and stacked based on priority setting - e.g. most recent on top. The time range is written as two time values separated by a slash, followed by a second slash and a period parameter (which must be P1D). Optional, default: none (the last valid image is returned). Examples: "TIME=2016-01-01", "TIME=2016-01-01/2016-02-01/P1D".

In addition to the standard WMTS request parameters, the WMTS service also supports many custom URL parameters. See Custom service URL parameters for details.

Standard GetTile request URL parameters:

WMTS parameter info

TILEMATRIXSET

The matrix set to be used for the output tile. Check GetCapabilities for a list of supported matrix sets.

TILEMATRIX

The matrix to be used for the output tile. Check GetCapabilities for a list of supported matrices.

TILECOL

The column index of the output tile. Check GetCapabilities for a list of supported matrix widths.

TILEROW

The column index of the output tile. Check GetCapabilities for a list of supported matrix heights.

LAYER

The preconfigured (in the instance) layer for which to generate the output tile.

FORMAT

The returned image format. Optional, default: "image/png". Detailed information about supported values.

Examples

Example below shows how to create the configuration for accessing a WMTS from a GetCapabilities response:

<!DOCTYPE html>
<html>
  <head>
    <title>WMTS Layer from Capabilities</title>
    <link rel="stylesheet" href="http://openlayers.org/en/v3.17.1/css/ol.css" type="text/css">
    <script src="http://openlayers.org/en/v3.17.1/build/ol.js"></script>
  </head>
  <body>
    <div id="map" class="map"></div>
    <script>
      var parser = new ol.format.WMTSCapabilities();
      var map;

      fetch('<ENTER YOUR WMTS URL HERE>?REQUEST=GetCapabilities').then(function(response) {
        return response.text();
      }).then(function(text) {
        var result = parser.read(text);
        var options = ol.source.WMTS.optionsFromCapabilities(result,
            {layer: 'TRUE_COLOR', matrixSet: 'PopularWebMercator512'});

        map = new ol.Map({
          layers: [
            new ol.layer.Tile({
              source: new ol.source.OSM(),
              opacity: 0.7
            }),
            new ol.layer.Tile({
              opacity: 1,
              source: new ol.source.WMTS(options)
            })
          ],
          target: 'map',
          view: new ol.View({
            center: [19412406.33, -5050500.21],
            zoom: 5
          })
        });
      });
    </script>
  </body>
</html>