Hi
When requesting statistics for sentinel 2 bands with aggregation_interval="P1D"
, but the Evalscript has the default mosaic method SIMPLE
, I get statistics response with intervals less than 5 days.
When using mosaic methods ORBIT or TILE I get only NaNs back.
I want to understand why I get intervals of less than 5 days and how to limit the results to one orbit (I guess?).
Thanks
Here is a code example:
evalscript = """
//VERSION=3
function setup() {
return {
input: [{
bands: ["B01", "B02", "B03", "B04", "B05", "B06", "B07", "B08", "B8A", "B09", "B11", "B12", "CLM", "dataMask"],
units: "DN"
}],
output: [
{
id: "bands",
bands: 12
},
{
id: "dataMask",
bands: 1
}
],
mosaicking: Mosaicking.SIMPLE
}
}
function evaluatePixel(sample) {
// masking cloudy pixels
let combinedMask = sample.dataMask
if (sample.CLM > 0) {
combinedMask = 0;
}
return {
bands: [sample.B01,sample.B02,sample.B03,sample.B04,sample.B05,sample.B06, sample.B07,sample.B08,sample.B8A, sample.B09, sample.B1972,sample.B12],
dataMask: [combinedMask]
};
}
"""
aggregation = SentinelHubStatistical.aggregation(
evalscript=evalscript,
time_interval= ('2022-02-12', '2022-05-03'),
aggregation_interval='P1D',
resolution=(10, 10)
)
input_data = SentinelHubStatistical.input_data(
DataCollection.SENTINEL2_L2A
)
request = SentinelHubStatistical(
aggregation=aggregation,
input_data=[input_data],
geometry= Geometry(geometry,crs=CRS(geometry.crs)),
config=config
)