Frequently Asked Questions

Home > Frequently Asked Questions

Integrating in web applications

Sentinel-2 - global coverage, full archive
Sentinel-3 - global coverage, full OLCI archive
Landsat-8 USGS - global coverage, almost full archive
Landsat-5,7,8 - ESA Archive - Europe and North Africa, full archive
ENVISAT MERIS - global coverage, full archive 

To explore availability, please check EO Browser.

Sentinel Hub is deployed on various infrastructures to ensure fastest performance. This is why there are different access points for different data sources:
- http://www.sentinel-hub.com/apps/wms-configurator for Sentinel-2 (recommended, most stable and performing service)
- http://apps.sentinel-hub.com/wms-configurator-uswest2/ for Landsat-8, global
- http://apps.eocloud.sentinel-hub.com/wms-configurator/ for Sentinel-3, ENVISAT MERIS, Landsat 5,7,8 - ESA Archive (this service is in prototype mode so some short interruptions may occur)

1. Configure your Instance in WMS Configurator.
2. Click "VIEW IN PLAYGROUND" button.
3. Click  button at the top right corner to open snippet tool.
4. Select the Google Maps maps library, type your Google Maps Api key and copy the code generated for the configured visualization.

Example: http://apps.sentinel-hub.com/examples/googlemaps/


Figure 1: Snippet tool is accessible in Sentinel Playground if it's opened from WMS Configurator. Before integration, you must enter your Google Maps API key.

1. Configure your Instance in WMS Configurator.
2. Click "VIEW IN PLAYGROUND" button.
3. Click  button at the top right corner to open snippet tool.
4. Select the Leaflet maps library and copy the code generated for the configured visualization.

Example: http://apps.sentinel-hub.com/examples/leaflet/


Figure 1: Snippet tool is accessible in Sentinel Playground if it's opened from WMS Configurator

1. Configure your Instance in WMS Configurator.
2. Click "VIEW IN PLAYGROUND" button.
3. Click  button at the top right corner.
4. Select the OpenLayers maps library and copy the code generated for the configured visualization.

Example: http://apps.sentinel-hub.com/examples/openlayers/


Figure 1: Snippet tool is accessible in Sentinel Playground if it's opened from WMS Configurator

General

In some cases ArcMap turns on all layers and calls WMS. Sentinel Hub WMS service does not support visualisation of many layers at the same time. We suggest you turn off all layers and turn them on one by one.

If you get the following error:

Turn off all layers and turn them on one by one:

Yes, we offer on-demand service, where we monitor specific places in the world and process data with Sen2Cor. This service requires additional payments to the overall Sentinel Hub subscription.

Use Sentinel Hub WFS request and retrieve all relevant geometries for given bounding box and time frame. From the response gather the unique dates. For each date, construct a WCS request to retrieve the image.
See the code example bellow.

<script>
        // using Sentinel Hub OGC web services - http://www.sentinel-hub.com/apps/wms
        // config
        window.SENTINEL_HUB_INSTANCE_ID = '<SENTINEL_HUB_INSTANCE_ID>';
        window.layerName = '1_NATURAL_COLOR';
        window.from = '2015-01-01';
        window.to = '2017-04-20';
        window.bbox = '-410925.4640611076,4891969.810251283,-391357.58482010243,4911537.689492286';
        window.maxFeatures = 100; // 100 is max

        let images = [];
        let url = `http://services.sentinel-hub.com/v1/wfs/${window.SENTINEL_HUB_INSTANCE_ID}
        ?service=WFS&version=2.0.0&request=GetFeature&time=${window.from}/${window.to}/P1D&typenames
        =TILE&maxfeatures=${window.maxFeatures}&srsname=EPSG:3857&bbox=${window.bbox}&outputformat=application/json`;

        (async () => {
            // retrieving
            // relevant geometries/images in bbox at time from-to
            // Sentinel Hub - WFS request - http://www.sentinel-hub.com/apps/wms/wfs-request
            try {
                let response = await fetch(url);
                let data = await response.json();
                relevantGeometries = data;
                return data;
            } catch (e) {
                throw new Error('There was an error fetching the list of geometries from WFS service.\nDid you 
                substitute your SENTINEL_HUB_INSTANCE_ID?');
            }
        })().then(geometries => {
            // parsing
            // relevant geometries -> all relevant dates
            if(geometries.features === undefined) geometries.features = []
            
            let dates = new Set();
            geometries.features.forEach(value => {
                dates.add(value.properties.date)
            });
            
            return Array.from(dates);            
        }).then(dates => {
            // mapping
            // dates -> image url
            // images available via WCS request - http://www.sentinel-hub.com/apps/wms/wcs-request
            dates.forEach(date => {
                let niceName = `${window.layerName} from ${date}.tiff`;
                niceName = encodeURIComponent(niceName);

                let imageUrl = `http://services.sentinel-hub.com/v1/wcs/${window.SENTINEL_HUB_INSTANCE_ID}
                ?service=WCS&version=1.1.2&request=GetCoverage&time=${date}&coverage=
                ${window.layerName}&nicename=${niceName}&bbox=${window.bbox}`;
                images.push(imageUrl);
            });

            shout(images);
        });

        let shout = value => {
            console.log('Images', value);
        }
    </script>

We recommend to check our “EO Product” page as well as Index DataBase, which holds numerous descriptions, along with scientific articles.

There is no difference in functionality or data between trial account and subscription account. With the trial account we like to give all the users opportunity to test the Sentinel Hub services at its fullest.

Our subscription plans are described here: http://sentinel-hub.com/pricing-plans

The difference between consumer-research and commercial plan is in the purpose of the usage of our services - if you are using it for research purposes or for yourself, consumer/research option is the right one. If you are using it within your company, you should use commercial option.

OGC consortium specifications for WMS, WFS, WCS, … services define the coordinate axis order. Older OGC service specifications assumed "X, Y" order for all coordinate reference systems (CRSs), even for WGS84 (EPSG:4326), while newer OGC service specifications obey the axis orders defined by the CRS's, not assuming "X, Y" order anymore. 

Sinergise services conform to the standards definitions. The WGS84 axis order are thus version dependent:

- WMS:
   - version 1.1.1: longitude, latitude
   - version 1.3.0: latitude, longitude
- WFS:
   - version 1.0.0: longitude, latitude
   - version 2.0.0: latitude, longitude
- WCS:
   - version 1.0.0: longitude, latitude
   - version 1.1.0: latitude, longitude
   - version 1.1.1: latitude, longitude
   - version 1.1.2: latitude, longitude

The user can always request a specific version of OGC services by providing and explicit "VERSION" parameter in the URL. If this parameter is not specified, the latest supported version of the service is used (for example, WMS 1.3.0 is used).
 

Some areas never have cloud coverage below 20%. This is why in Playground, where we have default setting for 20% of cloud coverage, for some areas seems there is no satellite imagery available. However if we turn slider for maximum cloud coverage to 100%, we can see data available.

You can use rjson R package and then convert the JSON object into an R object as in the following code snippets:


library("rjson")

loadFisResponse <- function(fisQuery) {
    return rjson::fromJSON(paste(readLines(fis_query), colapse = ""))
}

getDates <- function(fisResponse) {
    numberOfDates <- length(fisResponse[[1]])
    datesVector <- rep("", numberOfDates)
    for (listIndex in 1:numberOfDates) {
        datesVector[listIndex] <- fisResponse[[1]][[listIndex]]$date
    }
    return(datesVector)
}

makeHistogram <- function(fisResponse, itemIndex) {
    h <- fisResponse[[1]][[itemIndex]]$histogram
    numberOfBins <- length(h$bins)

    counts = rep(0, numberOfBins)
    values = rep(0, numberOfBins)
    for (i in 1:numberOfBins) {
        counts[i] <- h$bins[[i]]$count
        values[i] <- h$bins[[i]]$value
    }
    return(data.frame(values, counts))
}

getBasicStats <- function(fisResponse, itemIndex) {
    stats <- fisResponse[[1]][[itemIndex]]$basicStats
    minValue <- stats$min
    maxValue <- stats$max
    meanValue <- stats$mean
    standardDeviation <- stats$stDev
    return(data.frame(minValue, maxValue, meanValue, standardDeviation))
}

getNumberOfDates <- function(fisResponse) {
    return(length(fisResponse[[1]]))
}

The fisResponse object is expected to be a nested list that reflects the output format specified under FIS documentation.

Step 1: image Open WMS Configurator apps.sentinel-hub.com/wms-configurator/
Step 2: image Click "Add new layer" button.
Step 3: image Enter Layer title.
Step 4: image Fill the input fields, select "Product" from dropdown menu or write your "Custom script" by clicking on the "Pencil icon".
Step 5: image Type your custom script and click "Save". See detailed information about custom scripting here.
Step 6: image Click "Save All" to finish creating new layer.

image

For detailed information about WMS configuration click here.

We would like to serve data as they are, without uncontrolled changes, because it is almost impossible to set color balance to one fitting all places in the world and all groups of users. You can still tweak contrast in several ways.

You can choose different “Style” configuration.

Figure 1: Raw picture.

Configure atmospheric correction setting either to DOS-1 or to “Full”.
Figure 2: Atmospheric correction set to DOS-1.

You can tweak "Gain" (brightness), "Offset", and "Gamma" (contrast), or use "Enhanced" to automatically equalize the image.
Figure 3: Gain, Offset, and Gamma adjusted to desired values.

If you choose RGB advance style, you can even tweak each color band separately.
Figure 4: Tweaking B03 band.

To learn more about the licesing, please click here.

We do no charge anything automatically, nor do we extend a subscription period automatically.
Few weeks before end of subscription period users will be notified about incoming event and asked, whether they would like to extend the subscription. In case users decide for an extension, they will be asked for additional payment. In the opposite case, account will be frozen for one month period and deleted afterwards.

All Sentinel Hub services are available using both HTTP and HTTPS protocols.

You can turn off the logo in WMS configurator - just open "Instance configuration" and uncheck "Show logo":

Legends are part of layer information and will be displayed in your WMS client provided the client conforms to the WMS standard. Where exactly this is displayed within the client depends on the client. For QGIS, for example, the legend is displayed below the layer name.

Choose the NDVI layer in the WMS Configurator (http://apps.sentinel-hub.com/wms-configurator) or set the LAYERS parameter to NDVI (LAYERS=NDVI) in your request URL. The way the data is represented depends on the STYLE parameter, also settable in the WMS Configurator or by URL parameter.

There are several options, depending what you would like to do:
- You can add “DATE” layer to your WMS request and you will see dates of the scenes (note that we generate mosaic, which means that there might be different dates on different part of the screen), See example below.

- You can use a feature info request and point to some location. Response will contain date in it.
- You can use WFS service with the same parameters as WMS (e.g. date, cloud coverage). You will get a list of features representing scenes fitting the criteria.

In case it would be useful, you might see an example of such integration on GitHub Here

Our “calendar feature” uses WFS service.

In case you would like to get point values at some location (e.g. reflectance, NDVI, etc.) you can use the GetFeatureInfo request (e.g. "Identify features" or "feature info" in various GIS applications), e.g:

http://services.sentinel-hub.com/v1/wms/<INSTANCE_ID>?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetFeatureInfo&I=0&J=0&QUERY_LAYERS=NDVI&INFO_FORMAT=application/json&BBOX=38.55105530425345,-7.883667078518689,38.55269383803389,-7.885252872445627&CRS=EPSG:4326&MAXCC=100&WIDTH=1&HEIGHT=1&TIME=2017-03-16

Check also Statistical API.

To get information about all the available scenes in specific are can use a WFS call optionally with scene-limiting parameters (cloud coverage, time, etc.). See example here.

Add the EVALSCRIPT parameter to your request URL with the value of the base64 encoded script, as such: evalscript=cmV0dXJuIFtCMDQqMi41LEIwMyoyLjUsQjAyKjIuNV0%3D
More details described here

Projections depend on the use case, however since Sentinel-2 data is originally provided in the UTM projection this is also a good choice for export. For larger areas spanning multiple UTM zones a more global projection is preferable, such as Web Mercator (EPSG:3857) or WGS84 (EPSG:4326).

You can cite our applications / web pages in the following way (link is optional):

Image manipulation

You can add a parameter GEOMETRY as in this example:

http://services.sentinel-hub.com/v1/wms/<INSTANCE_ID>?SERVICE=WMS&REQUEST=GetMap&VERSION=1.3.0&LAYERS=TRUE_COLOR&MAXCC=20&WIDTH=640&HEIGHT=640&CRS=EPSG:4326
&BBOX=-7.885,38.540,-7.870,38.560&
GEOMETRY=POLYGON((
-7.877244 38.546511,
-7.876377 38.547818,
-7.871950 38.546125,
-7.872611 38.545023,
-7.871241 38.544475,
-7.869831 38.544560,
-7.866011 38.550445,
-7.872323 38.552895,
-7.874112 38.551451,
-7.877110 38.552537,
-7.878791 38.552976,
-7.879413 38.553099,
-7.880600 38.553320,
-7.881314 38.553126,
-7.882678 38.552762,
-7.883951 38.552667,
-7.885064 38.552160,
-7.885370 38.549346,
-7.877244 38.546511))

It is recommended to simplify geometry before passing it as a parameter to avoid exceeding maximum number of characters in URL.

You can use REFLECTANCE or SENSOR styles:

- REFLECTANCE is a physical format, which requires a 32-bit TIFF float. The values ​​are from 0..1. See example below:

 http://services.sentinel-hub.com/v1/wms/{INSTANCE_ID}...&LAYERS=B04&STYLES=REFLECTANCE&FORMAT=image/tiff;depth=32f

- SENSOR is a physical format, which requires a 32-bit TIFF float. Values ​​are from 0..10000​. See example below:

 ​http://services.sentinel-hub.com/v1/wms/{INSTANCE_ID}...&LAYERS=B04&STYLES=SENSOR&FORMAT=image/tiff;depth=32f

By employing the dynamically interpreted JavaScript language, and providing some specialized functions you can combine the bands of multispectral satellite data in unprecedented ways.

Here is an example how to tweak the image with a custom script in case of volcano eruption:

return [
B04*2.5 + Math.max(0,B12-0.1),
B03*2.5 + Math.max(0,B11-0.1),
B02*2.5];

Erupting vulcano

Etna volcano eruption, dated 16. 3. 2017. Image combined from true colour image, overlaid with SWIR bands 11 and 12. (view on Sentinel Playground)

You can find more examples and how to tweak the images for easier detection of Earth surface changes, clouds, snow, shadow, water etc. in our blog post.

You can use "Custom script" option and type in-the code along the following lines:

function  stretch(val, min, max)  {
 return (val-min)/(max-min);
}

return [
  stretch(B04, 0.05, 0.5),
  stretch(B03, 0.05, 0.5),
  stretch(B02, 0.05, 0.5)]

Upsampling and downsampling define the method used for interpolation of the data on non-natural scales. E.g. resolution of Sentinel-2 data (R,G,B and NIR bands) is 10 meters but in some occasions you would want to look at the data with higher scale (e.g. at 1 m pixel resolution) or lower scale (e.g. 1000 m pixel resolution). 
A default option is "nearest neighbour", which is best for performance. "Bicubic" is often nicer  on higher scales.
Note that the data are always exactly the same - it is just the interpolation method.

An example of the NDVI image of the field:

Downsampling_upsampling

The best way is to use WFS service, with TIME parameter defining the relevant time range.

Example is shown here.

Note that you can also use MAXCC parameter (maximum cloud coverage) in this call to filter for cloudless data.

As a result you will get a list of all available scenes for the chosen location in JSON format (or XML if set so). Some of the dates may be duplicated if there are two scenes available in the area. You should simply ignore these duplications.

Custom pixel calculation can be performed by creating a WMS layer with the "custom script" product selected in the WMS Configurator. How to use the script is detailed here.

Applying custom script

There are several options, depending on what you would like to do:
- You can add the “DATE” layer to your WMS request after which you will see the dates of the scenes (note that the generated image is a mosaic, which means that different dates on different part of the image are normal).
- You can use a feature info request and point to some location. The response will contain a date field within it.
- You can use the WFS service with the same parameters as used in your WMS request (e.g. date, cloud coverage). You will get a list of features representing scenes fitting the criteria.

Images are ordered by “Mosaicking order” priority (see WMS Configurator, can be set for each layer; you can also set this in a parameter). You can choose either to have most recent on top or least cloud coverage. You should also take into account “maximum cloud coverage” parameter. 
In case you want to get the most recent images acquired, you should set maximum cloud coverage to 100% and priority to “most recent”

Use the colorBlend method:
colorBlend(inputValue, indexArray, outputValueArray) The returned value is interpolated between the two consecutive values in outputValueArray (which represent RGB colors normalized to [0,1], e.g. pure red is [1,0,0]) based on the inputValue's location in the indexArray.

Note the indexArray and outputValueArray must be the same size. For example: return colorBlend(B04,    [0, 0.2, 0.4, 0.6, 0.8, 1],    [[0,0,0], [0.1,0.2,0.5], [0.25,0.4,0.5], [0.4,0.6,0.5], [0.75,0.8,0.5], [1,1,0.5]]); If B04 is 0.25 it will interpolate between [0.1,0.2,0.5] and [0.25,0.4,0.5] since they are the corresponding colors to the 0.2 and 0.4 indices in the indexArray nearest to B04.

The general parameters are detailed here .
Custom parameters are detailed here .