var region = ee.Geometry.Polygon(
[[[97.78377127623679, 34.38017364126854],
[97.78377127623679, 25.800394145321253],
[109.03377127623679, 25.800394145321253],
[109.03377127623679, 34.38017364126854]]], null, false); // 替换为你的位置
// 定义时间范围
var startDate = '2022-01-01';
var endDate = '2022-12-31';
// 导入数据,这里使用MODIS 13Q1数据
var collection = ee.ImageCollection('MODIS/006/MOD13Q1')
.filterDate(startDate, endDate)
.filterBounds(region);
// 計算每16天最大值
var composite = collection.max();
var ndviStartDate = '2022-01-01';
var ndviEndDate = '2022-12-31';
var ndvi2022 = composite;
var ndviBand = ndvi2020.select('NDVI');
Map.addLayer(region, { color: 'FF0000' }, 'Region of Interest');
Map.centerObject(region, 10);
Map.addLayer(ndviBand, { min: 0, max: 10000, palette: '000000,00FF00' }, 'NDVI 2020');
var exportParams = {
image: ndviBand, //
description: 'NDVI_2022',
folder: 'GEE_Export',
fileNamePrefix: 'ndvi_2022',
scale: 1000,
region: region
};
Export.image.toDrive(exportParams);
使用GEE进行月均NDVI合成并导出到谷歌网盘
于 2023-06-18 22:56:09 首次发布