Skip to content

STACK service specifications


Service Description

The Co-located Stacking (STACK) service computes the co-location of single-band assets having different map projections and spatial resolutions on a common grid. It performs resampling and warping of the secondary datasets and the stacking of each secondary with the reference. The upsampling or/and downsampling of spatially overlapping datasets is performed on a common area (intersection based on STAC asset geometry) and is based only on pixel coordinates. The service requires input geocoded products, which are a prerequisite for the stacking service. As an example, input single-band assets can be taken from calibrated datasets from different sensors, optical and SAR. Output products from other services can be employed as input in STACK (e.g. coherence from SAR-COIN or DInSAR services). STACK supports single-band assets derived from the following services: PAN-Sharp, OPT-Index, BAS, DInSAR (and COIN for coherence only), IRIS, HOTSPOT and HASARD. It also support as input the following aux products: JRC Global Surface Water, Copernicus DEM, ESA World Cover. Co-location results depend on the level of accuracy of geopositioning of source images. The Co-located Stacking processor is built with the GDAL VRT method1. It can also generate new assets from the co-located stack using band arithmetic.


The service implements the workflow depicted below.

graph TB c(cos2) --> dn[Dataset n] c --> d3[Dataset ...] c --> d2[Dataset 2] c --> d1[Dataset 1] dn --> b((SAR or opt<br>calibration)) d3 --> b((SAR or opt<br>calibration)) d2 --> b((SAR or opt<br>calibration)) d1 --> b((SAR or opt<br>calibration)) b --> an[input 1] b --> a3[input 2] b --> a2[input ...] b --> a1[input n] subgraph Inputs an[Dataset n] a3[Dataset ...] a2[Dataset 2] a1[Dataset 1] ba1[List of assets from<br>input Dataset 1,2,...,n] ba2[S-expression/s] end subgraph Co-located Stacking ba1 --> stack an --> stack((Co-located<br>stacking)) a3 --> stack((Co-located<br>stacking)) a2 --> stack((Co-located<br>stacking)) a1 --> stack((Co-located<br>stacking)) stack --> csn[Co-located<br>asset 1] stack --> cs3[Co-located<br>asset 2] stack --> cs2[Co-located<br>asset ...] stack --> cs1[Co-located<br>asset n] csn --> stack1((Band<br>arithmetic)) cs3 --> stack1((Band<br>arithmetic)) cs2 --> stack1((Band<br>arithmetic)) cs1 --> stack1((Band<br>arithmetic)) ba1 --> stack1((Band<br>arithmetic)) ba2 --> stack1((Band<br>arithmetic)) end subgraph Outputs csn[Co-located<br>asset n] --> o2[Co-located<br>asset n] cs3[Co-located<br>asset ...] --> o3[Co-located<br>asset ...] cs2[Co-located<br>asset 2] --> o4[Co-located<br>asset 2] cs1[Co-located<br>asset 1] --> on[Co-located<br>asset 1] stack1 --> o1[New asset/s from <br> Co-located stack] end


Input of the Co-located Stacking service are geocoded images from supported SAR or optical sensors (e.g. geophysical single-band assets in Datasets derived systematically in the calibration processing from supported SAR and Optical sensors). Co-location stacking is also possible if the input set of images is built by mixing assets from SAR and Optical EO data. Input assets in STACK can be also output single-band assets products from other services (e.g. coherence from SAR-COIN or DInSAR services).


The STACK service requires a specified number of mandatory and optional parameters. All service parameters are listed in the below Table 1.

Parameter Description Required Default value
Input product reference(s) List of Datasets, Aux Dataset or Results from other processors including assets to be co-located YES
List(s) of comma-separated bands List of assets to be colocated as comma-separeted items YES
Area of Interest Area of interest expressed in WKT NO
S-expression/s S-expression/s to generate additional asset/s from the ones in the stack (e.g. average) NO

Table 1 - Service parameters for the STACK processor.

More information about the service parameters are given below.


This first mandatory parameter is the list of input products that are used to create the collocated stack.

The input products can be:

  • Optical calibrated products,
  • SAR calibrated products,
  • Auxiliary datasets,
  • Geophysical results of downstream processing service executions (e.g. SAR-COIN).


The specified input-product reference must include at least one geophysical single-band asset. In the co-location only single-band geophysical assets can be used.


This second mandatory parameter is a list of bands expressed as a comma separated list of common band names. It defines, for each input-reference product, the list of common band names to extract. There's a one-to-one mapping between the input-reference and the assets parameters. The list of single-band geophysical assets to be used for the co-location shall be given as a list of comma separated items following the following convention:



To build a STACK using multiple geophysical single-band assets (e.g. coastal, blue, green, red, and nir) from a single Calibrated Dataset (e.g. by specifying only one input product references 1) the users shall define the 5 input assets in STACK as following:



To build a multitemporal STACK using multiple geophysical single-band assets (e.g. s0_db_c_vv, and s0_db_c_vh) from multiple Calibrated Datasets (e.g. by specifying three different Optical Calibrated Datasets given as input product references 1, 2, and 3) the users shall define the 6 input assets in STACK as following:



To build a co-located stack using a pair of two coherence geophysical single-band assets (e.g. coh_c_vv_20220330_20220411,, and coh_c_vv_20220517_20220529) derived from two SAR-COIN Result, obtained by exploiting 4 Sentinel-1 SLC Datasets acquired on 20220330, 20220411, 20220517, and 20220529 (by specifying two references to COIN Results given as input product references 1, and 2) the users shall specify two references to COIN Results given as input product references 1, and 2 and define the 2 input assets in STACK as following:

1.coh_c_vv_20220330_20220411, 2.coh_c_vv_20220517_20220529


It is also possible to build a co-located stack by mixing different types of geophysical single-band assets (e.g. flood-mask from the HASARD service, and coh_c_vv_20220517_20220529 from the SAR-Coin one) derived from Results of two different processing services (by specifying two references: one to an HASARD Result and a second one to a COIN Result given as input product references 1, and 2). In this scenario the users shall specify references to HASARD and COIN Results as input product references 1, and 2 respectively. Thus, 2 input assets can be defined in STACK as following:



Use comma separated reference.bands and avoid spaces between assets.


All CBNs available in the ESA Charter Mapper can be found here.

AOI (optional)

This third parameter (optional) may define the area of interest expressed as a Well-Known Text value.


If set, it overrides the automatic determination of the maximium common area between the input-reference products geometry.


In the definition of “Area of interest as Well Known Text” it is possible to apply as AOI the drawn polygon defined with the area filter. To do so, click on the Magic tool wizard :fontawesome-solid-magic: button in the left side of the "Area of interest expressed as Well-known text" box and select the option AOI from the list. The platform will automatically fill the parameter value with the rectangular bounding box taken from current search area in WKT format.

S-expression (optional)

This forth optional parameter allows generating a new band derived from the collocated stack result product (e.g. average, index etc.).

A new band is defined with a key and it's associated s-expression separated by a colon : .



S-expressions can be made by using only the assets inserted in the list and not with all the ones in the source Dataset.


The s-expressions inserted by the user must be given within brackets.

As an example to derive a new asset as the average between red bands from a pair of input-reference products ( and

average:(/ (+ 2)

This will add a new asset called average in the co-located stack with average values derived from and

S-expressions in the ESA Charter Mapper supports arithmetic (* + / -) and logical (< <= == != >= > & |) operators plus some pre-defined functions.

More information about supported functions can be found in Table 2.

Function Description Syntax
asarray convert the input (list, tuples, etc.) to an array (asarray x)
interp returns the one-dimensional piecewise linear interpolant to a function with given discrete data points (xp, fp), evaluated at x (interp x xp fp)
mean returns the mean value (scalar) from the given input array x (mean x)
norm_diff returns the mormalized difference between A and B as per ((x - y) / (x + y)) (norm_diff x y)
where return elements chosen from x or y depending on condition (where (condition) x y)

Table 2 - Supported functions that can be used in s-expressions.


The current list of functions can be further expanded in the future based on the user needs.

Examples of s-expresions which can be used to generate new bands from the STACK are listed in the below sections.


The following s-expression:

sum:(+ 1.pan 2.pan)

can be used to generate a band as the sum of 1.pan and 2.pan.


The following s-expression:

difference:(- 1.pan 2.pan)

can be used to generate a band as the difference of 1.pan and 2.pan.


The following s-expression:

average:(/ (+ 1.pan 2.pan) 2)

can be used to generate a band as the average between the values of 1.pan and 2.pan.

Difference from average

The following s-expression:

diff_from_avg:(- 1.pan (mean 1.pan))

can be used to estimate a band of difference from the average value of 1.pan.

Normalized difference

The following s-expression:

ndvi:(norm_diff 1.nir

can be used to derive multiple spectral indexes defined as normalized difference (e.g. NDVI, NDWI, NDBI, etc.).

Interpolate or rescale

The following s-expression:

rescaled:(interp (asarray 0 10000) (asarray 0 1))

can be used to interpolate the resclaed TOA reflectance into its original [0,1] range. Here (asarray 0 10000) returns [0, 10000] and is used to specify input range to be used for the interpolation.


The following s-expression:

opt_water_mask:(where (>= (norm_diff 1.nir) 0.3) 1 0)

can be used to derive water mask from binarization. Here (norm_diff 1.nir) is used to derive the NDWI index. The value 0.3 represents the threshold as TOA reflectance. Similar s-expressions can be made also for SAR such as:

sar_water_mask:(where (<= 1.s0_db_c_hh -23) 1 0)

in which 1.s0_db_c_hh is the asset and the value -23 represents the threshold as Sigma Nought in dB.


The output of this service is a multi-mission and multitemporal co-located stack with N assets as single band GeoTIFF in COG format. The output is a STAC item with as many assets as provided in input. All assets of this co-located stack are COG and have the same shape.

STACK Product specifications can be found in the table below.

Attribute Value / description
Long Name Co-located stack from Optical or SAR EO data
Short Name source_reference_number.source_asset (e.g. 1.nir)
Description Multiband co-located stack of N images from optical and radar sensors
Processing level L1 / L2 (according to input)
Data Type Float32
Band N single-band
Format COG
Projection According to input
Fill Value According to input

  1. GDAL documentation, gdalbuildvrt, available at: