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 = """
//VERSION=3
function setup() {
return {
input: [{
datasource: "S1GRD",
bands: ["VV","VH"]
},
{
datasource: "S2L2A",
bands: ["B01","B02","B03",
"B04","B05","B06",
"B07","B08","B8A",
"B09","B11","B12"]
}
],
output: [{
bands: 14,
sampleType:"FLOAT32"
}]
}
}
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,
s2.B01,s2.B02,s2.B03,s2.B04,
s2.B05,s2.B06,s2.B07,s2.B08,
s2.B8A,s2.B09,s2.B11,s2.B12]
}
"""
poly = some polygon
bbox = BBox(bbox=poly, crs=CRS.WGS84)
time_interval = ('2019-12-27', '2021-01-14')
request = SentinelHubRequest(
evalscript=evalscript,
input_data=[
SentinelHubRequest.input_data(
data_collection=DataCollection.SENTINEL1_IW,
time_interval=time_interval,
other_args = {"dataFilter":{"resolution":"HIGH","acquisitionMode":"IW"},"processing":{"backCoeff":"GAMMA0_TERRAIN","orthorectify":True,"demInstance":"COPERNICUS"},"id":"S1GRD"}
),
SentinelHubRequest.input_data(
data_collection=DataCollection.SENTINEL2_L2A,
time_interval=time_interval,
other_args = {"id":"S2L2A"}
),
],
responses=[
SentinelHubRequest.output_response('default', MimeType.TIFF),
],
data_folder='imgs',
bbox=bbox,
config=config
)