I want to mask pixels based on the quality band information for image collection Landsat 5. this is a code but the image-collection is empty afterward. I would be thankful if anyone could help me.
var startDate = '1992-01-01'
var endDate = '1993-01-01'
var cloudCover = 30
var collection1992 = ee.ImageCollection('LANDSAT/LT05/C01/T1_SR')
.filter(ee.Filter.eq('WRS_PATH', 170))
.filter(ee.Filter.eq('WRS_ROW', 32))
.filterDate(startDate,endDate)
.filterMetadata('CLOUD_COVER','less_than',cloudCover)
.sort('system:time_start')
// cloud mask 66,130
var collection1992_noclouds = collection1992.map(function(img) {
var mask1 = img.select('pixel_qa').eq(66).eq(130)
return img.UpdateMask(mask1)
})
Map.addLayer(collection1992_noclouds, {}, 'collection1992_noclouds')
No comments:
Post a Comment