var Jan2016 = ee.ImageCollection('COPERNICUS/S2') .filterBounds(NSW) .filterDate('2016-01-01', '2016-01-30'); var trueColor = {bands: ['B4', 'B3', 'B2'], min: 0, max: 3000}; var falseColor= {bands: ['B8', 'B3', 'B4'], min: 0, max: 3000}; //Define the CLoud layer (here: QA60 is MSI2's quality mask) var Clouds = {bands: ['QA60']}; //Add the cloud mask as layer; PROBLEM: SEEMS QA60 is taken from different images every time.. //Clouds is just a band, do i need to specify the threshold? Map.addLayer(Jan2016, Clouds, "CloudsJan16"); // Mask clouds var noclouds = Jan2016.map(function(img) { var mask = img.select(['QA60']).neq(11); //.neq(xx) doesn't seem to make a difference return img.updateMask(mask); }); //Add the layer/imagery to the map with variable, display type, and name Map.addLayer(noclouds, trueColor, "NoClouds"); Map.addLayer(Jan2016, falseColor, "Jan2016false");
var Jan2016 = ee.ImageCollection('COPERNICUS/S2') .filterBounds(NSW) .filterDate('2016-01-01', '2016-01-30'); var trueColor = {bands: ['B4', 'B3', 'B2'], min: 0, max: 3000}; var falseColor= {bands: ['B8', 'B3', 'B4'], min: 0, max: 3000}; //Define the CLoud layer (here: QA60 is MSI2's quality mask) var Clouds = {bands: ['QA60']}; //Add the cloud mask as layer; PROBLEM: SEEMS QA60 is taken from different images every time.. //Clouds is just a band, do i need to specify the threshold? Map.addLayer(Jan2016, Clouds, "CloudsJan16"); // Mask clouds var noclouds = Jan2016.map(function(img) { var mask = img.select(['QA60']).neq(11); //.neq(xx) doesn't seem to make a difference return img.updateMask(mask); }); //Add the layer/imagery to the map with variable, display type, and name Map.addLayer(noclouds, trueColor, "NoClouds"); Map.addLayer(Jan2016, falseColor, "Jan2016false");