I have tried to apply a cloud mask for a landsat 8 collection using code1, code2, and code3 but none will work.
code1 encounters the error of not working even after changing
var mask = img.select(['cfmask']).neq(4)
to
var mask = img.select(['pizel_qa_bands']).neq(3)
code2 encounters the problem of not being a time series dataset. I want to be able to extract pixel values for each image over a period of time but this code only gives one output of pixel values.
and I can't adapt my script to code3.
Here is my script and all i want to do is remove the clouds and cloud cover from a Landsat8 image collection
var l8_mayo = ee.ImageCollection('LANDSAT/LC08/C01/T1_TOA')
.filterDate('2000-01-01', '2018-12-31')
.filter(ee.Filter.eq('WRS_PATH', 208))
.filter(ee.Filter.eq('WRS_ROW', 23));
var visParams = {bands: ['B4', 'B3', 'B2'], max: 0.3};
Map.setCenter(-9, 53, 8);
Map.addLayer(l8_mayo, visParams, 'l8_mayo collection');`
TOA
product. Have you tried the Surface ReflectanceSR
collection with its associated quality band and cloud masks?.map()
to apply the function to each image within the collection.