X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 18 Apr 2019 10:08 AM by  MariM
Mathematical operation in Raster stack
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

Rajeev Bhattarai



New Member


Posts:11
New Member


--
18 Apr 2019 08:24 AM
    Hi,
    I have a raster stack of 15 rasters and another stack of the same number of raster layers. Now I want to subtract one layer from another from two stacks. How can I do that quickly? ENVI allows me to do calculations only in a single band basis. Is there any way to do operations in a stack quickly?
    Thanks in advance.

    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    18 Apr 2019 10:08 AM
    You can only do this if the stacks are the same dimensions and pixel sizes and assumes they are coincident with each other. Then in Band Math, you can use:

    float(b1) - float(b2)

    Then use 'Map variable to input file' and select stack1 as 'b1' variable and stack2 as 'b2' variable.
    You are not authorized to post a reply.