Hello,
I have read the new units that are used and I feel a bit confused,
I used to have script to get raster with two bands: NDVI and NDMI, with values range between -1 to 1. However, now I’m getting the raster with values that seems to be between 0-255, despite the fact it is NDVI and NDMI.
I don’t know if it’s because I use the “CLM” band, and that’s has different units based on the documentation (UINT8 and UINT16 for the optical bands). Maybe there is nothing to do with the new units, but I thought maybe it related.
This is my evalscript:
evalscript_sen2 = """
//VERSION=3
function setup() {
return {
input:
"B04", "B08", "B11","CLM"],
output: { bands: 2 },
sampleType:"UINT16"
};
}
function evaluatePixel(sample) {
if (sample.CLM == 1) {
return null]
}
const ndvi = index(sample.B08, sample.B04);
const ndmi = index(sample.B08, sample.B11);
return
ndvi,ndmi];
}
"""
My goal is to get raster with two bands with values between -1 to 1, float.