Global Mapper Pro

MSAVI2 formula in raster calculator

hennie
hennie Global Mapper UserTrusted User
edited December 2014 in Technical Support
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) [64-bit] - REGISTERED

My formula is something like the following:

(2*B5+1 - ((2*B5+1)^2 - 8*(B5-B4))^0.5)/2

The formal definition is: MSAVI2.jpg

Kind regards

Hennie Schoeman

Comments

  • JeffH@BMG
    JeffH@BMG Global Mapper Developer Trusted User
    edited December 2014
    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
  • JeffH@BMG
    JeffH@BMG Global Mapper Developer Trusted User
    edited December 2014
    Bug #15051
  • JeffH@BMG
    JeffH@BMG Global Mapper Developer Trusted User
    edited December 2014
    Hello Hennie,

    OK, we have new build that should address the problem that you reported. We have the new builds links below:

    32-bit: http://www.bluemarblegeo.com/downloads/global-mapper/global_mapper16.zip
    64-bit: http://www.bluemarblegeo.com/downloads/global-mapper/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:


    32-bit: C:\Program Files (x86)\GlobalMapper16
    64-bit: 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 pre-built formulas.

    thanks,

    ~Jeff
  • hennie
    hennie Global Mapper User Trusted User
    edited December 2014
    Hi Jeff,

    Thank you for the prompt reply and excellent follow-up 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 pre-built 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
  • hennie
    hennie Global Mapper User Trusted User
    edited December 2014
    Hi Jeff,

    Just to let you know that the formula works perfectly now!

    Thanks again.

    Hennie
  • JeffH@BMG
    JeffH@BMG Global Mapper Developer Trusted User
    edited December 2014
    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
Sign In or Register to comment.