WMS request

WMS request

The Sentinel WMS service conforms to the WMS standard. It not only provides access to Sentinel-2's 13 unprocessed bands (B01 through B12 - with B8A following B08) but also to 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.

It is possible to obtain multiple separate instances (which act as separate WMS services) each with their own configuration and list of layers which will likely be useful to advanced users. For more information see the "WMS configuration" chapter.

The base URL for the WMS service:

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

For example, a GetCapabilities request can be done by changing the {INSTANCE_ID} to your provided instance ID and opening the following URL:

http://services.sentinel-hub.com/v1/wms/{INSTANCE_ID}?REQUEST=GetCapabilities

Some of the most common provided products:

  • TRUE_COLOR - a brightened RGB image
  • FALSE_COLOR - uses near-infrared instead of the blue band
  • NDVI - Normalized Difference Vegetation Index
  • EVI - Enhanced Vegetation Index

List of all available products available EO products

Additional informational overlays are also provided as layers for convenience:

  • OUTLINE - draws an outline around areas which contain valid data
  • FILL - fills the areas which contain valid data
  • CLOUDS - draws the areas which are covered with clouds
  • DATE - draws the dates of the granules
  • ID - draws the IDs of the granules

These additional informational overlays support the following styles:

  • COLORED (default) - each tile is colored differently, with the color computed from the tile's ID
  • RED, GREEN, BLUE, WHITE and BLACK - solid color

The service supports standard WMS requests: GetMap, GetCapabilities, GetFeatureInfo, and also some custom requests. Supported WMS versions are 1.1.1 and 1.3.0.

The WMS (Web Map Service) 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", "image/tiff;depth=16" or "image/tiff;depth=32f" (for 32-bit floating point). 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.

WMS URL parameters

Standard common WMS URL parameters (parameter names are case insensitive, values are case sensitive):

WMS parameter info

SERVICE

Required, must be "WMS".

VERSION

WMS version standard. Optional, default: "1.3.0". Supported values: "1.1.1" and "1.3.0".

REQUEST

What is requested, valid values: GetMap, GetFeatureInfo, GetCapabilities or a custom request's name. Required.

TIME

(when REQUEST = GetMap or GetFeatureInfo) 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 WMS URL parameters, the WMS service also supports many custom URL parameters. See Custom service URL parameters for details.

Standard GetMap request URL parameters:

WMS parameter info

BBOX

Specifies the bounding box of the requested image. Coordinates must be in the specified coordinate reference system. The four coordinates representing the top-left and bottom-right of the bounding box must be separated by commas. Required. Example: BBOX=-13152499,4038942,-13115771,4020692

CRS

(when VERSION 1.3.0 or higher) the coordinate reference system in which the BBOX is specified and in which to return the image. Optional, default: "EPSG:3857". For a list of available CRSs see the GetCapabilities result.

SRS

(when VERSION 1.1.1 or lower) the coordinate reference system in which the BBOX is specified and in which to return the image. Optional, default: "EPSG:3857". For a list of available CRSs see the GetCapabilities result.

FORMAT

The returned image format. Optional, default: "image/png". Supported values: "image/png", "image/jpeg", "image/tiff", "image/tiff;depth=8", "image/tiff;depth=16".

WIDTH

Returned image width in pixels. Required.

HEIGHT

Returned image height in pixels. Required.

BGCOLOR

Default background color. Option, default: "FFFFFF". Supported formats: "0xRRGGBB", "0xAARRGGBB", "#RRGGBB", "#AARRGGBB", "RRGGBB", "AARRGGBB".

TRANSPARENT

(when FORMAT = "image/png" or "image/tiff") The returned image has an alpha channel which is blank for pixels with no valid or available input data. Optional, default = "false". Supported values: "true", "false", "0", "1".

LAYERS

The preconfigured layer (image) to be returned. You must specify exactly one layer and optionally add additional overlays. Required. Example: LAYERS=TRUE_COLOR,OUTLINE

EXCEPTIONS

The exception format. Optional, default: "XML". Supported values: "XML", "INIMAGE", "BLANK" (all three for version >= 1.3.0), "application/vnd.ogc.se_xml", "application/vnd.ogc.se_inimage", "application/vnd.ogc.se_blank" (all three for version < 1.3.0).

Examples

Image wms URL
yavuz_bridge

Monitoring of bridge construction,
Yavuz Sultan Selim Bridge, Turkey
(images acquired on 2016-02-08 and 2016-02-29).

http://postcards.sentinel-hub.com/v1/wms/bc5af835-ee20-4d98-bda9-b64b2fd...

 

http://postcards.sentinel-hub.com/v1/wms/bc5af835-ee20-4d98-bda9-b64b2fd...

benghazi_ndvi_land_changes

Croplands near Benghazi, Libya (changes
in vegetation between 2016-01-05 and 2016-04-14).

http://postcards.sentinel-hub.com/v1/wms/bc5af835-ee20-4d98-bda9-b64b2fd...

 

http://postcards.sentinel-hub.com/v1/wms/bc5af835-ee20-4d98-bda9-b64b2fd...

Note - postcards.sentinel-hub.com is throttled.

Standard GetFeatureInfo request URL parameters:

WMS parameter info

BBOX

Specifies the bounding box of the area which contains the queried point. Coordinates are in the specified CRS/SRS. Four coordinates representing the top-left and bottom-right of the bounding box must be separated by comma. Required. Example: BBOX=-13152499,4038942,-13115771,4020692

CRS

(when VERSION 1.3.0 or higher) the coordinate reference system in which the BBOX is specified. Optional, default: "EPSG:3857". For a list of available CRSs see the GetCapabilities result.

SRS

(when VERSION 1.1.1 or lower) the coordinate reference system in which the BBOX is specified. Optional, default: "EPSG:3857". For a list of available CRSs see the GetCapabilities result.

WIDTH

The image-space width containing the queried point, in pixels. Required.

HEIGHT

The image-space height containing the queried point, in pixels. Required.

INFO_FORMAT

The output format of the feature info content. Check GetCapabilities for a list of supported formats.

QUERY_LAYERS

The layers for which the feature info is requested.

I and J

(when VERSION 1.3.0 or higher) The X and Y coordinates in the output image space in pixels of the feature queried.

X and Y

(when VERSION 1.1.1 or lower) The X and Y coordinates in the output image space in pixels of the feature queried.

 

Examples

Example below shows the contents of the result object from parsing a WMS capabilities response:

<!DOCTYPE html>
<html>
  <head>
    <title>WMS Capabilities Parsing</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>
    <style>
      .log-container {
        height: 400px;
        overflow: scroll;
      }
    </style>
  </head>

  <body>
    <pre class="log-container"><code id="log"></code></pre>
    <script>
      var parser = new ol.format.WMSCapabilities();
      fetch('<ENTER YOUR URL HERE>').then(function(response) {
        return response.text();
      }).then(function(text) {
        var result = parser.read(text);
        document.getElementById('log').innerText = JSON.stringify(result, null, 2);
      });
    </script>
  </body>
</html>