X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 31 Oct 2018 08:36 AM by  MariM
ENVIROIMASKRASTER: Mask ROI does not contain any valid pixels for input raster
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

Grace Wu



New Member


Posts:
New Member


--
30 Oct 2018 04:33 PM
    I am trying to do a simple masking of an AVIRIS scene using a single polygon shapefile that indicates my study extent. I've converted the shapefile into an ROI using the vector to ROI tool. I've been getting the "ENVIROMASKRASTER: Mask ROI does not contain any valid pixels for input raster" error. I can clearly see that the shapefile overlaps with the image and that they both have the same projection. Also, I have attempted the same procedure using the shapefile/vector directly and that resulted in the error, "ENVIVECTORMASKRASTER: Mask from vectors does not contain any valid pixels for input raster."

    I have been doing this by selecting the image in the Layer Manager, selecting File --> Save As --> Save As (ENVI...) --> Mask --> select the .shp or roi file --> OK --> OK. The error message appears after selecting OK in the File Selection window. I have also used IDL to do the exact same thing using both the ENVI task method (i.e., ENVITask('VectorMaskRaster')) and the routine method (e.g., ENVIVectorMaskRaster(raster, shp)). They both yielded the same error in the IDL Console.

    However, I can successfully do this when I use the "Subset Data from ROIs" tool and selecting "Yes" for the option to "Mask pixels outside of ROIs?"

    What am I doing wrong or is this a bug?


    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    31 Oct 2018 08:36 AM
    Is the AVIRIS image a subset of a larger image? Check the AVIRIS image metadata. Is there an X/Y offset in the header? If so, edit the metadata and remove the x/y start values (these reference the subset position to the original but are unnecessary). Does this help resolve the error?
    You are not authorized to post a reply.