5

I am working with a 23-band GEOTiff in which each band is a 16-day MVC MODIS NDVI image. The MODIS .hdfs include a "pixel reliability" image with the following values:

     [-1]: Fill/No Data-Not Processed. 
     [0]:  Good data      - Use with confidence 
     [1]:  Marginal data  - Useful, but look at other QA information 
     [2]:  Snow/Ice       - Target covered with snow/ice 
     [3]:  Cloudy         - Target not visible, covered with cloud

I want to apply a quality mask using ENVI to elimate pixels with values of -1, 2 and 3. I know how to do this for a single image using the "Build Mask" function in ENVI. If I use the 23-band NDVI.tiff file as my input and use the 23-band pixel reliability file as my mask, will this mask each NDVI image with its respective pixel reliability (i.e. January 1st NDVI will be masked with the January 1st pixel reliability mask), or will the "Build Mask" perform some other operation?

If I am thinking about this in the wrong way, is there a better way to apply the quality mask to the time-series stack?

Many thanks!

Emily

2 Answers 2

1

You should apply mask to NDVI image accordingly one by one. Because every NDVI band has its own pixel reliability band, but ENVI does not have this function of automatically masking each NDVI band by matching pixel reliability band.

2
  • Your Answer was flagged up as being of low-quality due to it being so brief. Would you be able to expand upon precisely what you are advising. It does not have to be lots of detail but think of a few sentences as being about the minimum that Stack Exchange looks for in an Answer.
    – PolyGeo
    Commented Feb 21, 2014 at 7:01
  • NDVI is a derived product that uses the nIR band and red band. It would be helpful if you could clarify your answer.
    – Aaron
    Commented Apr 23, 2015 at 16:42
0

Here is a solution with Google Earth Engine

With the code here: https://code.earthengine.google.com/dbc0d9733284c29d872ee44c9b8d47af

//Create a rectangle of your area of interest
var rectangle = ee.Geometry.Rectangle(94.7982, 31.3826, 96.3418, 30.5868);
Map.centerObject(rectangle);
Map.addLayer(rectangle, {}, 'rectangle')

// SPECIFY THE BANDS OF INTEREST
var bands = ['NDVI', 'SummaryQA'];

// CREATE AN IMAGE COLLECTION OF THE MODIS DATASET
var modis = ee.ImageCollection("MODIS/006/MOD13Q1").filterDate('2000-01-01', '2005-01-01').select(bands).filterBounds(rectangle);

// PIXEL QUALITY MASKING
var maskQA = function(image) {
   var summaryqaband = image.select('SummaryQA')
     var mask = summaryqaband.neq(1).and(summaryqaband.neq(2)).and(summaryqaband.neq(3))
        return image.updateMask(mask);
};

var goodqualdataset = modis.map(maskQA)

print(goodqualdataset, 'MOD13Q1-masked-list');

// MAKE A LIST OF THE IMAGES IN THE COLLECTION
var goodquallistOfImages = goodqualdataset.toList(goodqualdataset.size());

// VISUALIZATION PARAMETERS
var ndviParams = {bands:['NDVI'], min: -1, max: 1, palette: ['blue', 'white', 'green']};

var img2 = goodquallistOfImages.get(9);

// ADD THE LAYER AND SEE HOW THE MASK WORKED
Map.addLayer(ee.Image(img2).divide(10000).clip(rectangle), ndviParams, 'masked-modis-image-2000')

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.