Sunday, 29 May 2016

google earth engine - How to mask pixels in image collection?


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

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...