Fusion without aggregating (mosaicking) the dates

When using a data fusion request with a SentinelHubRequest, the output is always one image (e.g. latest).
Is it possible to receive multiple images - i.e. all the available dates which had both sentinel 1 and 2 acquisitions?

The other way around this is to WMS request the data for sentinel 1, request the data for sentinel 2, use get_dates(), find the intersection of the dates, and iterate on those dates using the fusion SentinelHubRequest.



You can indeed return multiple images using SentinelHubRequest. To do so, you would need to adjust the Evalscript that you are calling and return the multiple acquisitions as bands: please see the second example in this section of the documentation (as well as the return section).

Here is another example of how to access multi-temporal data through the Sentinel Hub python package.

Let us know if you have questions about the implementation!

Thank you.
I went through the docs and examples you provided but when I don’t know how many times senitenl1 and sentinel2 had overlapping acquisition dates, I’m not sure how to adjust my script.

evalscript = """
function setup() {
  return {
    input: [{
        datasource: "S1GRD",
        bands: ["VV","VH"]
        datasource: "S2L2A",
        bands: ["B01","B02","B03",
    output: [{
      bands: 14,

function evaluatePixel(samples) {
  var s1 = samples.S1GRD[0]
  var s2 = samples.S2L2A[0] 
  return [10 * Math.log((s1.VV)+0.0001) / Math.LN10, 10 * Math.log((s1.VH)+0.0001) / Math.LN10,
poly = some polygon
bbox = BBox(bbox=poly, crs=CRS.WGS84) 
time_interval =  ('2019-12-27', '2021-01-14') 
request = SentinelHubRequest(
                    other_args = {"dataFilter":{"resolution":"HIGH","acquisitionMode":"IW"},"processing":{"backCoeff":"GAMMA0_TERRAIN","orthorectify":True,"demInstance":"COPERNICUS"},"id":"S1GRD"}
                    other_args = {"id":"S2L2A"}
                SentinelHubRequest.output_response('default', MimeType.TIFF), 

Hi @tonish,

The solution is not so straightforward, but still doable!

I looked into this a bit and whilst it is possible to do this all in the Evalscript, the solution is not elegant. Since you are working in Python, there is a solution to obtain what you want in an easier way.

You can query the Catalog API (you will need sentinelhub-py >= 3.2.0) to fetch the list of dates for each dataset . Then you can calculate the overlapping acquisition dates and filter your Datafusion request for those dates.

Because it’s a bit complicated, @batic and I decided to share a Jupyter Notebook with the processing steps here on the forum for all interested people to use. In your case, you can adapt it to request the bands that you need (I only put 3 bands in for simplicity). The output of the script is 1 geotiff per satellite band. Each geotiff contains as many bands as common acquisition dates.

Jupyter Notebook: Github link, NBviewer link.

1 Like

Thanks. This is very helpful!

We have been thinking a little bit more about the approach because it is quite an interesting problem! Although the solution posted above is ok, we found a smarter way of getting the results without using Catalog API.

The difference is that you can do everything in the Evalscript using the preProcessScenes (doc):

  • fetch the dates for each sensor
  • find the intersection of the date lists
  • directly filter the scenes considered in the evaluatePixel function

The advantage is that you don’t need the Catalog request and you don’t need to pass any variables from python to the Evalscript.

The links in my post above were updated. If you want to compare with the old version, you can check the previous version in Git.

1 Like