MapInfo Pro

 View Only
  • 1.  Raster Calculator

    Posted 09-21-2020 11:58
    Hi
    I have an elevation data set with values from 0 to 20 metres.  I'm trying to use the Raster Calculator to run a sum that will keep all values between 0 and 5 unchanged, but for those areas that have a value greater than 5 to change them to a value of 5.  The result will be a data set of elevations from 0 to 5m.  I don't want to 'delete' any areas greater than 5m, but rather re-assign a value of 5 to them.
    Any help on how to do this would be very much appreciated.
    Thank you!


    ------------------------------
    simon luckett

    ------------------------------


  • 2.  RE: Raster Calculator

    Posted 09-21-2020 17:34
    Sounds like you want to clip the raster so that no values exceed 5.

    Hit the 'New' input button and choose the raster you want to process. The default name will be "Input_1". I usually change these to A, B etc by clicking on the name in the list. Then, from the functions list, choose the "min" function.
    All you need is this expression (where A is the name of the input)-

    min(A,5)

    Hit the Compute button and you have your new raster.

    You can also do this using a virtual raster in which case the processing all occurs on the fly. If you have a very large input raster this can save you a big processing operation.

    ------------------------------
    Sam Roberts
    Engineer, MapInfo Pro Advanced (Raster)
    Australia
    ------------------------------



  • 3.  RE: Raster Calculator

    Posted 09-22-2020 08:06
    Many thanks Sam, that works perfectly.
    Hugely appreciated
    Cheers

    ------------------------------
    simon luckett
    Tarmac Trading Limited.
    Chichester
    ------------------------------