加载影像
//加载Landsat8
var l8 = ee.ImageCollection("LANDSAT/LC08/C01/T1_SR")
//加载sentinel
var imageCollection = ee.ImageCollection("COPERNICUS/S1_GRD"),
var imageCollection2 = ee.ImageCollection("COPERNICUS/S2"),
var imageCollection3 = ee.ImageCollection("COPERNICUS/S2_SR");
影像去云函数
//Landsat8去云
function rmL8Cloud(image) {
var cloudShadowBitMask = (1 << 3);
var cloudsBitMask = (1 << 5);
var qa = image.select('pixel_qa');
var mask = qa.bitwiseAnd(cloudShadowBitMask).eq(0)
.and(qa.bitwiseAnd(cloudsBitMask).eq(0));
return image.