Alex,
It depends on how you are accessing your data. We have tried setting up the same configuration layer (with Sentinel-2 L2A), displaying it in EO Browser and it works.
However, to display in EO Browser (if this is how you are trying to access the layer) you need to change the script a little. As it is in the repository, it returns UINT16
digital number (reflectance
* 10000) values. To display correctly in EO Browser, we should change the SampleType to UINT8
:
function setup() {
return {
input: [{
bands: [
"B04",
"B03",
"B02",
"SCL"
],
units: "DN"
}],
output: {
bands: 3,
sampleType: SampleType.UINT8
},
mosaicking: "ORBIT"
}
}
Then to return values scaled in the UINT8
range, I would return the following (get reflectance, scale to 0-255, and multiply by 2.5 for a better visualisation):
return [rValue/10000*255*2.5, gValue/10000*255*2.5, bValue/10000*255*2.5]
Another tip: don’t forget to check the time-range of data being filtered in the evalscript. In the default script the filter fetches 1 year of data:
function filterScenes (scenes, inputMetadata) {
return scenes.filter(function (scene) {
return scene.date.getTime()>=(inputMetadata.to.getTime()-12*31*24*3600*1000);
});
}
Lastly, I would strongly suggest that you test the configuration layer access over a small extent and a short time period (e.g. 1 month) first: fetching years of data consumes a lot of Processing Units! Once you have it working for a small test example, then you can scale up.
Please let me know if you run into any other problems.
Maxim