今天分享一下如何在GEE中下载landsat影像,以landsat8为例,因为我的目标是下载地表真实影像,所以选择的数据集为’LANDSAT/LC08/C01/T1_SR;这个数据集已经进行过辐射定标和大气校正;运行代码如下:

研究区还是以山西省为例

//以山西省为研究区
var roi = ee.FeatureCollection("users/lilei655123/shanxi");
// 去云函数
function maskL8sr(image) {
// Bits 3 and 5 are cloud shadow and cloud, respectively.
var cloudShadowBitMask = (1 << 3);
var cloudsBitMask = (1 << 5);
// Get the pixel QA band.
var qa = image.select('pixel_qa');
// Both flags should be set to zero, indicating clear conditions.
var mask = qa.bitwiseAnd(cloudShadowBitMask).eq(0)
.and(qa.bitwiseAnd(cloudsBitMask).eq(0));
return image.updateMask(mask);
}
//Landsat8SR数据,经过辐射定标和大气校正
var l8SR = ee.ImageCollection('LANDSAT/LC08/C01/T1_SR')
.filterBounds(roi)
.filterDate('2020-06-01', '2020-09-30')
.map(maskL8sr)
.select('B1','B2','B3','B4','B5','B6','B7','B10','B11')
.median() //中值合成
.clip(roi)

print("l8SR",l8SR)

var rgbVis = {
min: 0.0,
max: 3000,
gamma: 1.4,
bands: ['B4', 'B3', 'B2'],
};

Map.addLayer(l8SR, rgbVis, 'l8SR');
Map.centerObject(roi,7)

//boundary
var styling = {color:"red",fillColor:"00000000"};
Map.addLayer(roi.style(styling),{},"geometry")

//影像导出函数
Export.image.toDrive({
image: l8SR.select('B4', 'B3', 'B2'),
description: 'l8SR',
crs: "EPSG:4326",
scale: 30,
region: roi,
maxPixels: 1e13,
folder: 'shanxi'
});

因为我的目标是查看地表的真实影像,所以选用波段为’B4’, ‘B3’, ‘B2’,为真彩色合成

显示结果如下:

Google Earth Engine(GEE)下载landsat影像_数据集


下载至云盘:

Google Earth Engine(GEE)下载landsat影像_大数据_02


声明:仅供学习使用!

更多内容请关注微信公众号“生态遥感监测笔记”