I am using the MODIS Terra Continuous Vegetation Fields Global Yearly 250m dataset to derive PTC values for forests. For this, I need to filter pixels that have PTC values that are at least 10%. While I know how to do it on individual images, I am not sure as to how I can apply the same condition for a pixel throughout the image collection (10 years).[for all 10 years, the pixel must be at least 10%] I've tried the filter.Metadata() but I don't think the dataset has a metadata property for me to use. Any ideas as to how I can go about implementing the condition?
var PTC = ee.ImageCollection('MODIS/006/MOD44B')
.filterDate('2001-01-01','2011-01-01')
.filterBounds(MYR) //you could use a sample region
.select('Percent_Tree_Cover')
.map(function(image) { return image.clip(MYR)});
print(PTC);
var PTC_forests = PTC
.filterMetadata('system:bands', 'not_less_than', 10); // not too sure which property I should use
Will mapping a function work instead? I believe this might only filter out pixels that fulfil the criteria within the image, rather than applying the same criteria on a pixel throughout the 10 years.
var PTC_forests = PTC.map(function (image){
var forest = image.gte(10)
return image.mask(forest)
});