Muy nueva en este tema, ayuda!

Hi @dcrb1001 ,

There’s a bug in your code. You should use the curly brackets ({}) instead of the square brackets ([]) for the conditional statement. Please see the example below.

if (NDVI < 0.2) {
  return [0, 1, 0];
}

Nothing yet, will I have another bug in the code?

var NDVI = (B08-B04)/(B08+B04)

If (NDVI < 0.2) {
return [1, 1, 1];
}

If (NDVI < 0.4) {
return [0, 1, 0];
}

If (NDVI < 0.7) {
return [0, 0.5, 1];
}

else {
return [0, 0, 0]
}

Hi @dcrb1001 ,

if should be lower case.

//VERSION=3
var NDVI = (B08-B04)/(B08+B04)

if (NDVI < 0.2) {
  return [1, 1, 1];
}

if (NDVI < 0.4) {
  return [0, 1, 0];
}

if (NDVI < 0.7) {
  return [0, 0.5, 1];
}

else {
  return [0, 0, 0]
}


before

after to refresh

Hi @dcrb1001 ,

Sorry for the late reply. Could you please share the link which does not work by copying the link displayed by the share button (the red square in the figure)?

Really thanks, I decided to carry out the study through Google Engine, I see many difficulties here. I’m almost done with the study.

I’m trying to find the CRI1 index within the sentinel literature but not finding it, do you happen to know where it is located?

Hi @dcrb1001 ,

This is a forum for Sentinel Hub related issue. Regarding your questions, I would suggest trying the STEP forum.

Really thank you very much for all your help. Good Life!!

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.