Hi! I’m trying to compute the NDWI index with the PlanetScope 8 bands product and I noticed that it gives me always a negative number. I’m using this script
//VERSION=3
//NDWI
function setup() {
return {
input: [{
bands: [
"Green",
"NIR",
"dataMask"
]
}],
output: {
bands: 2
}
}
}
function evaluatePixel(samples) {
let val = (samples.Green-samples.NIR)/(samples.Green+samples.NIR);
return [val, samples.dataMask]
}
I tried to download the raw bands of NIR and Green and saw that the rage values of NIR is always greater than the range values of Green band, for this the the values are always negative. I checked the images over a period of a few months in the same area but nothing changed, the values are always below zero.
Do you have any suggestions on how to fix this? Thanks
