Thanks for your swift reply Mr. Chung.
I am comparing the EO browser for NDWI:
which is different than what it appears in the Sentinel Hub plugin in the QGIS for NDWI:
The script used to obtain the image in the QGIS plugin is the NDWI. I tried some but all with black background, and the following is the one that it is more similar to the EO browser image results:
//VERSION=3
var colorRamp1 = [
[0, 0xFFFFFF],
[1, 0x008000]
];
var colorRamp2 = [
[0, 0xFFFFFF],
[1, 0x0000CC]
];
let viz1 = new ColorRampVisualizer(colorRamp1);
let viz2 = new ColorRampVisualizer(colorRamp2);
function evaluatePixel(samples) {
var val = index(samples.B03, samples.B08);
if (val < -0) {
return [...viz1.process(-val), samples.dataMask];
} else {
return […viz2.process(Math.sqrt(Math.sqrt(val))), samples.dataMask];
}
}
function setup() {
return {
input: [{
bands: [
“B03”,
“B08”,
“dataMask”
]
}],
output: {
bands: 4
}
}
}
As I mentioned, the images do not match. It seems that the one in the EO browser represents better the reality.
Thank you very much