I need to get global 1km EVI map based on MODIS data, and the map shows correct EVI values. However, Export.image.todrive seems malfunctioning as it exports very small geotiffs with small size, and the rows/columns visualized in gis are incorrect. Is there any problem I ignore in the code?
var roi = ee.Geometry.Rectangle(
[-180, -90, 180, 90]
)
var modis = ee.ImageCollection('MODIS/061/MOD13A2')
function yearly_evi(year){
var start_date = ee.Date.fromYMD(year, 1, 1)
var end_date = start_date.advance(1, 'year')
var yearly_collection = modis.filterBounds(roi)
.filterDate(start_date, end_date)
.select("EVI")
print(yearly_collection)
var mean_evi = yearly_collection.mean().multiply(0.0001)
return mean_evi.set("year", year)}
var evi = yearly_evi(2019)
print(evi)
Map.addLayer(
evi,
{bands: ['EVI'],
},
'EVI'
);
Export.image.toDrive(
{image:evi.toDouble(),
description:'Yearly_EVI_mean_2019',
folder:'EarthEngine',
fileNamePrefix:'Yearly_EVI_mean_2019',
scale:1000,
region:roi,
maxPixels:1e13
})
the global EVI map shown in GEE editor:
enter image description here
New contributor
Taochun Sun is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.