Note: Examples of custom processing scripts can be found at https://custom-scripts.sentinel-hub.com/
Part of every WMS/WMTS/... request to our services are parameters
instance id and
layer. To obtain them, you need to log into the WMS Configurator to create suitable configurations. Combination of
instance id and
layer determines the data source and the script (either predefined or custom). The layer's script can also be overriden via
EVALSCRIPT URL parameter when doing a WMS/WMTS/... request.
Note: EOCloud service supports basic scripts (and ES5) only. AWS services support both basic and extended scripts.
Basic scripts are run once for each pixel. They get the inputs through global variables and return an array of values.
Note: for more complex setup you should use extended scripts where supported, especially if you use Visualizers.
Available inputs depend on data source:
|Data source||Available inputs|
|Sentinel-2 L1C||B01, B02, B03, B04, B05, B06, B07, B08, B8A, B09, B10, B11, B12|
|Sentinel-2 L2A||B01, B02, B03, B04, B05, B06, B07, B08, B8A, B09, B11, B12, SCL*, SNW**, CLD**|
|Sentinel-1 GRD||VV, VH, HH, HV|
B01, B02, B03, B04, B05, B06, B07, B08, B09, B10, B11, B12, B13, B14, B15, B16, B17, B18, B19, B20, B21
O3, NO2, SO3, CO, CH4, HCHO, AER_AI_340_380, AER_AI_354_388, CLOUD_FRACTION, CLOUD_BASE_HEIGHT, CLOUD_BASE_PRESSURE, CLOUD_OPTICAL_THICKNESS, CLOUD_TOP_HEIGHT, CLOUD_TOP_PRESSURE
|Landsat 8 L1C||B01, B02, B03, B04, B05, B06, B07, B08, B09, B10, B11, BQA|
|MODIS||B01, B02, B03, B04, B05, B06, B07|
*SCL: More info
** SNW and CLD bands are experimental and should not be used (they are subject to change without notice)
*** Only basic scripts are supported for these data sources
Please see data sources (and the corresponding EO products) for further information on the available input data.
Script must return an array of values. The length of the returned array is not prescribed by the system, but it must obey the following constraints:
Often an array of a single value is returned (for example NDVI or some other indicator), or 3 values if one wants to visualize layer in RGB - but this depends on the use case and the client software.
Interpretation of returned values depends on output format:
JPG: values are mapped so that range [0..1] maps to range
TIFF16, 0..255 for other formats); values under 0.0 or over 1.0 are set to 0.0 and 1.0 respectively.
TIFF32F: values are returned directly (as float32)
More info on output formats here.
return [ B04 * 2.5 + Math.max(0, B12 - 0.1), B03 * 2.5 + Math.max(0, B11 - 0.1), B02 * 2.5 ];
Etna volcano eruption, dated 16. 3. 2017. Image combined from true colour image, overlaid with SWIR bands 11 and 12. (view in Sentinel Playground)