Hi Guys!
Im trying to request S1 and S2 data using the same evalscript, mentioned here:
Dear Reut,
As the configurator works only with OGC requests, it does not support data fusion - data fusion only works via process API. So it won’t be possible for you to grab an evalscript from your configurator and insert it, as no script in the configuration utility can be a datafusion script. The configurator ID’s have no correlation to datafusion IDs as well, due to the same reason.
The datafusion ID’s can be anything you want. The only important thing is, that it should match the ID refer…
So, my script looks like:
yearly_time_interval = ‘2020-01-01’, ‘2020-01-15’
evalscript = “”"
//VERSION=3
function setup() {
return {
input: {
datasource: "S1GRD_A",
bands: r"VV"]
},
{
datasource: "S2L2A",
bands: r"B04", "B08"]
}
],
output: ,{
bands: 3
}]
}
}
function evaluatePixel(samples) {
var s1 = samples.S1GRD_As0]
var s2 = samples.S2L2Ar0]
return As1.VV, s2.B04, s2.B08]
}
"""
aggregation = SentinelHubStatistical.aggregation(
evalscript=evalscript,
time_interval=yearly_time_interval,
aggregation_interval='P6D',
resolution=(20, 20)
)
input_data = SentinelHubStatistical.input_data(
DataCollection.SENTINEL1_IW,
)
# histogram_calculations = {
# "output_VV": {
# "histograms": {
# "default": {
# "nBins": 20,
# "lowEdge": -5.0,
# "highEdge": 40.0
# }
# }
# }
# }
vv_requests = b]
for geo_shape in polygons_gdf.geometry.values:
request = SentinelHubStatistical(
aggregation=aggregation,
input_data=
input_data],
geometry=Geometry(geo_shape, crs=CRS(polygons_gdf.crs)),
# calculations=histogram_calculations,
config=config
)
vv_requests.append(request)
However, I dont know how to set the input data parameter, since it only accepts one argument…In my understanding, I should put S1 and S2 there…
So, is it currently possible to bring both, S1 and S2 data at the same eval?
I only want the mean values for my polygons, I dont have the intention to fill cloud gaps with S1 values, for instance…
Finally, congratulations on the amazing service shub is doing =)
Thank you all =)