1

I'm trying to calculate WDVI index but for some reason the computation failes and I don't find my mistake. The function works but all the pixels are 0.

var addWDVI = function(image) {
  var red=image.select('B4');
  var RedEdge=image.select('B8A');
  var WDVI = RedEdge.subtract(red.multiply(RedEdge.divide(red)))
  .rename('WDVI')
  .copyProperties(image,['system:time_start']);
  return image.addBands(WDVI);

};

This is the link to my code- https://code.earthengine.google.com/43e76e0665ceb3dc20dcbc8a8cae5e25

My end goal- to add this index to my code

1 Answer 1

1

The way you defined the equation, the outcome is always zero. Let's take a simplified example:

WDVI = 3 - (2 * (3/2)) = 3 - 3 = 0

In "The application of a weighted infrared-red vegetation index for estimating leaf area index by correcting for soil moisture", (Clevers e1989), is stated that you should use the reflectance of the soil for the red and RedEdge band in this part (RedEdge.divide(red)). Thus, you should first derive or estimate soil reflectance values for these bands in your are of interest.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.