代码如下(以鹿邑县为例):
var roi = ee.FeatureCollection('users/www1573979951/luyixian')
Map.centerObject(roi,7)
//筛选Landsat8影像
var l8_image = ee.ImageCollection('LANDSAT/LC08/C01/T1_SR').filterBounds(roi).filterDate('2020-01-01', '2020-12-31').filter(ee.Filter.lte('CLOUD_COVER',10)).median().clip(roi);
var rgbVis = {
min: 0.0,
max: 3000,
bands: ['B4', 'B3', 'B2'],
};
Map.addLayer(l8_image, rgbVis, 'l8_image');
数据集截图:
遥感影像截图:
代码如下(以鹿邑县为例)
var roi = ee.FeatureCollection('users/www1573979951/luyixian');
Map.centerObject(roi,7);
//筛选Landsat8影像
var l8_image = ee.ImageCollection('LANDSAT/LC08/C01/T1_SR').filterBounds(roi).filterDate('2020-01-01', '2020-12-31').filter(ee.Filter.lte('CLOUD_COVER',10)).median().clip(roi);
var ndwi = l8_image.normalizedDifference(['B3','B5']).float().rename('l8_NDWI');
var visParams1 = {min: 0, max: 1, palette: ['0000FF', 'FF0000']};
Map.addLayer(ndwi, visParams1, "l8_NDWI");
print(ndwi);
Export.image.toDrive({
image: ndwi,
description: 'l8_NDWI',
crs: "EPSG:4326",
scale: 30,
region: roi,
maxPixels: 1e13,
folder: 'l8_NDWI'
});
TIF数据截图: