I would like to calculate a Modified Soil-Adjusted Vegetation Index 2 on the basis of Landsat 8 OLI imagery, bands 5 (NIR) and 4 (RED), using the Raster Calculator. The formula should be:
I have tried to convert this using the following map algebra expression in the Raster Calculator:
MSAVI2 = (2 * "NIR layer" + 1 - SquareRoot((2 * "NIR layer" + 1) ^ 2 - 8 * ("NIR layer" - "RED layer"))) / 2
The returned values are between 0.5 and 58113.5. They should be between -1 and 1 though, so something is not right.
Any ideas about what is going wrong here?
Thanks!
^ is a boolean xor
Raster Calculator—Help | ArcGIS for Desktop
use pow or ** (I think)
is SquareRoot chosen from the list of operators or did you type it in
Thank you; ** is indeed the power operator.
SquareRoot is chosen from the operators list.
The result seems to be better although I still get values between -202.015 and 1.00195, with a mean of 0.12. The formula should give values only between -1 and 1.
2 * "NIR layer" ..... - 8 * ("NIR layer" - "RED layer"))) / 2
make sure you make judicious use of floating point values
2.0 * "NIR layer" ......- 8.0 * ("NIR layer" - "RED layer"))) / 2.0
Thanks; this also helps: Max value is now at 1.0
The minimum value, however, is still at 202.015.
sorry... can you re-write the latest incarnation and check the reference formula...it wouldn't be the first time that I saw one of those wrong