MSAVI2 formula in raster calculator
hennie
Global Mapper UserTrusted User
Please help me with the correct way of input of the formula for MSAVI2 in the raster calculator. I have tried many permutations but always get the message "missing ')' ".
I am using Global Mapper v16.0.6 (b120314) [64bit]  REGISTERED
My formula is something like the following:
(2*B5+1  ((2*B5+1)^2  8*(B5B4))^0.5)/2
The formal definition is: MSAVI2.jpg
Kind regards
Hennie Schoeman
I am using Global Mapper v16.0.6 (b120314) [64bit]  REGISTERED
My formula is something like the following:
(2*B5+1  ((2*B5+1)^2  8*(B5B4))^0.5)/2
The formal definition is: MSAVI2.jpg
Kind regards
Hennie Schoeman
Comments

Hi Henni,
OK. Looks like that's a bug in the formula parser. The part that recognizes mathematical operators wasn't looking for '^', and the error is unclear as to what's going. My apologies. We should be able to get a fix out for this in pretty short order, and I'll post back here when it's available.
Thanks for using Global Mapper.
Best regards,
~Jeff 
Bug #15051

Hello Hennie,
OK, we have new build that should address the problem that you reported. We have the new builds links below:
32bit: http://www.bluemarblegeo.com/downloads/globalmapper/global_mapper16.zip
64bit: http://www.bluemarblegeo.com/downloads/globalmapper/global_mapper16_64bit.zip
Simply download the .zip file for the build that you are using and extract over your existing installation files. The likely locations to extract to are as follows:
32bit: C:\Program Files (x86)\GlobalMapper16
64bit: C:\Program Files\GlobalMapper16_64bit
I wasn't able to verify that the actual formula that you posted worked correctly on image data  it did run to completions, but I don't know much about how to apply it or what to expect. If you encounter any problems with it, please feel free to report back here, and we can take a closer look. Is that a common formula for image processing? We could consider adding it to our list of prebuilt formulas.
thanks,
~Jeff 
Hi Jeff,
Thank you for the prompt reply and excellent followup updating of GM16. I will soon give it a try and let you know should there be any further problems. BTW  will the formula parser of GM15 also be updated?
The MSAVI2 formula is the Modified Soil Adjusted Vegetation Index. It is up to you whether you want to include it as a prebuilt formula. In South Africa we do have areas with a wide degree of exposed soil surface. This formula gives a refined adaptation of NDVI in such areas.
Kind regards,
Hennie Schoeman 
Hi Jeff,
Just to let you know that the formula works perfectly now!
Thanks again.
Hennie 
Hi Hennie,
Sorry for the problem, but glad to hear that it's working for you now.
As far as I know, the formula parser in GM 15 works fine with that formula (I tried it). The parser was completely rewritten for GM 16 (mainly to add an 'IF' conditional function, I recall; it got some speedup as well, I think), but regrettably, the '^' exponentiation operator fell through the cracks. But GM 15 should be OK in that respect, and GM 16, going forward.
Thanks again for reporting this to us, and please let us know if we can be of further assistance to you.
Best regards,
~Jeff
Howdy, Stranger!
Categories
 12.2K All Categories
 5.3K Features Discussion
 312 Downloading Imagery
 1.2K Elevation Data
 371 Georeferencing Imagery Discussion
 580 GM Script Language
 42 User Scripts
 111 GPS Features
 388 Projection Questions
 788 Raster Data
 1.3K Vector Data
 6.4K Support
 159 Announcement and News
 881 Bug Report
 554 SDK
 1.1K Suggestion Box
 3.6K Technical Support
 520 Other Discussion
 125 GIS Data Sources
 26 Global Mapper Showcase
 217 How I use Global Mapper
 99 Global Mapper Forum Website