如何在 Google earth engine 中对 Landsat 8 表面反射率数据进行云掩蔽?
how cloud masking is done on Landsat 8 surface reflectance data in Google earth engine?
我想从 google earth engine 下载云掩蔽的 Landsat 8 表面反射率集合。我不知道如何执行云掩蔽算法。这是我的代码:
Map.centerObject(table);
Map.addLayer(table);
var sur = ee.ImageCollection.load('LANDSAT/LC08/C01/T1_SR')
.filterBounds(table)
.filterDate('2013-01-01','2019-11-01')
.filter(ee.Filter.equals('WRS_PATH',15))
.filter(ee.Filter.equals('WRS_ROW',33))
.filter(ee.Filter.lt('CLOUD_COVER', 5))
//.filter(ee.Filter.equals('IMAGE_QUALITY',4))
//.filter(ee.Filter.rangeContains('CLOUD_COVER',15,45));
.filter(ee.Filter.lt('CLOUD_COVER_LAND', 5));
print(sur);
// list of images (client side)
var imColl_sur = sur.getInfo().features;
print('features: ', imColl_sur);
print('length: ', imColl_sur.length);
// loop on client side
for (var i = 0; i < imColl_sur.length; i++) {
var id = imColl_sur[i]["id"];
var im = ee.Image(id);
var clip = im.clip(table);
var b1 = clip.select('B1');
var D_T = imColl_sur[i]["properties"]["SENSING_TIME"];
var sza = (imColl_sur[i]["properties"]["SOLAR_ZENITH_ANGLE"]).toString();
Export.image.toDrive({
image: b1,
description: id.slice(8, 12)+"_surReflectance_B1_"+ id.slice(28, 34) +"_"+ D_T.slice(0,4)+D_T.slice(5,7)+D_T.slice(8,10) + "_" + D_T.slice(11,13)+D_T.slice(14,16) + "_" + sza.slice(0,2)+sza.slice(3,8),
scale: 30,
region : table,
maxPixels : 1e9
});
}
谢谢
您应该查看 Earth Engine 团队提供的这个示例:https://code.earthengine.google.com/?scriptPath=Examples:Cloud%20Masking/Landsat8%20Surface%20Reflectance
此脚本使用来自 CFMask 的预先计算的 Landsat 8 QA 波段来移除云和云影。
我想从 google earth engine 下载云掩蔽的 Landsat 8 表面反射率集合。我不知道如何执行云掩蔽算法。这是我的代码:
Map.centerObject(table);
Map.addLayer(table);
var sur = ee.ImageCollection.load('LANDSAT/LC08/C01/T1_SR')
.filterBounds(table)
.filterDate('2013-01-01','2019-11-01')
.filter(ee.Filter.equals('WRS_PATH',15))
.filter(ee.Filter.equals('WRS_ROW',33))
.filter(ee.Filter.lt('CLOUD_COVER', 5))
//.filter(ee.Filter.equals('IMAGE_QUALITY',4))
//.filter(ee.Filter.rangeContains('CLOUD_COVER',15,45));
.filter(ee.Filter.lt('CLOUD_COVER_LAND', 5));
print(sur);
// list of images (client side)
var imColl_sur = sur.getInfo().features;
print('features: ', imColl_sur);
print('length: ', imColl_sur.length);
// loop on client side
for (var i = 0; i < imColl_sur.length; i++) {
var id = imColl_sur[i]["id"];
var im = ee.Image(id);
var clip = im.clip(table);
var b1 = clip.select('B1');
var D_T = imColl_sur[i]["properties"]["SENSING_TIME"];
var sza = (imColl_sur[i]["properties"]["SOLAR_ZENITH_ANGLE"]).toString();
Export.image.toDrive({
image: b1,
description: id.slice(8, 12)+"_surReflectance_B1_"+ id.slice(28, 34) +"_"+ D_T.slice(0,4)+D_T.slice(5,7)+D_T.slice(8,10) + "_" + D_T.slice(11,13)+D_T.slice(14,16) + "_" + sza.slice(0,2)+sza.slice(3,8),
scale: 30,
region : table,
maxPixels : 1e9
});
}
谢谢
您应该查看 Earth Engine 团队提供的这个示例:https://code.earthengine.google.com/?scriptPath=Examples:Cloud%20Masking/Landsat8%20Surface%20Reflectance
此脚本使用来自 CFMask 的预先计算的 Landsat 8 QA 波段来移除云和云影。