how can I select only good data (Quality informations) from Modis product in Google Earth Engine. I tried use this code:

var collection = ee.ImageCollection ('MODIS/MYD13Q1').select(['NDVI'],['SummaryQA'] == 0).filterDate(ee.Date('2013-01-01'),ee.Date('2015-12-31'))

But this does not work

1 Answer 1


You need to mask all values where SummaryQA is not 0 in every image of your collection. This is done with a map in EarthEngine where you define a function to be applied to each image in your collection. You then create a new collection by mapping this function over every image in your old collection. goodCollection then only contains observations marked as "Good Data".

var collection = ee.ImageCollection ('MODIS/MYD13Q1')

//function to create mask from SmmaryQA
var maskQA = function(image) {
  return image.updateMask(image.select("SummaryQA").eq(0));

var goodCollection = collection.map(maskQA)

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.