Below is a link to the code I've put together, but I am struggling with creating an updated cloud mask for Landsat collection 2 level 2 tier 1. I want to remove all cloudy pixels and mosaic all the images left in the image collection together.
https://code.earthengine.google.com/6632972afef53d9aea082d7f40e8d4e7
// Filter image collectiton by bounds and geometry
var L7_2000 = ee.ImageCollection('LANDSAT/LE07/C02/T1_L2')
.filterDate('2000-08-01', '2000-11-30')
.filterBounds(geometry)
.filterMetadata('CLOUD_COVER','less_than', 50);
// Centre map canvas on geometry
Map.centerObject(geometry);
// Apply scaling factors and add to map canvas
function applyScaleFactors(image) {
var opticalBands = image.select('SR_B.').multiply(0.0000275).add(-0.2);
var thermalBand = image.select('ST_B6').multiply(0.00341802).add(149.0);
return image.addBands(opticalBands, null, true)
.addBands(thermalBand, null, true);
}
L7_2000 = L7_2000.map(applyScaleFactors);
// Apply visulation parameters
var vis = {
bands: ['SR_B3', 'SR_B2', 'SR_B1'],
min: 0.0,
max: 0.3,
};
// Print the number of images in image collection on to console
print(L7_2000);
// Add image collection to map canvas remaining after filters and visualisation parameters applied
Map.addLayer(L7_2000, vis, 'True Color (321)');