X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 23 Sep 2020 09:21 AM by  Morgan Bond
no data value dropped in layer stack
 2 Replies
Sort:
You are not authorized to post a reply.
Author Messages

Morgan Bond



New Member


Posts:2
New Member


--
21 Sep 2020 10:03 AM
    I have a large Worldview 3 scene that is composed of a panchromatic image and a multispectral image. I am using ENVI modeler to create a layer stack of the pan, multispectral, and some veg indices (e.g. NDVI). I need the resulting stack to be in byte data format (0-255)

    At the start of my process the multispectral and pan band images have a no data value of 0. From the multispectral I create the indices I need, then perform a linear percent stretch raster. I also stretch the multispectral band and the pan band, and feed all three of those into an aggregator node. From the aggregator I put them into a "build layer stack" and output the result.

    The resulting file does not have a "data ignore value" in the header, and I cannot add one (there is no field) if I try to edit the header information. The areas that were originally "no data" no have a value of either 0 or 255 depending upon the band. I could mask the raster by data values, but I am worried that the 0 or 255 for each band will be inconsistent, and I would like to use this process for other novel images.

    So, I am interested in workarounds. Is there another wat to carry the data ignore areas through the process? Could I make an roi out of them somehow at the beginning and mask with that at the end? Thanks.

    System info:
    ENVI 5.6
    Windows 10




    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    23 Sep 2020 07:47 AM
    I am not surprised the DIV is lost when layer stacking. SInce the DIV can only be a single value for all bands, I think you are going to have to create a mask of your pixels to ignore that are based on *all* bands and apply the mask so there is a single value for DIV. Then you could use Mask Raster by Data values task (or mask by ROI) to apply the DIV again.

    Morgan Bond



    New Member


    Posts:2
    New Member


    --
    23 Sep 2020 09:21 AM
    Thanks Mari. The problem I have is that the 0-255 stretch means that there is now no value that can be used for DIV without changing the data type, which I don't want to do. Its as if I need to specify a 1-255 stretch to leave 0 free for DIV.
    You are not authorized to post a reply.