Given a 30 m resolution Image in Google Earth Engine, I would like to export it to Google Drive at a 1000 m resolution such that within each 1000 m pixel I obtain the sum of the underlying 30 m pixels.
I know the reduceResolution function, which however is suitable only for small areas (up to 65536 pixels) and does not allow to specify the output resolution.
In other words, I would like to achieve what in R can be done with the function aggregate of the raster package.
Take the following example:
var image = image.clip(geometry)
Map.addLayer(image);
Export.image.toDrive({
image: image,
description: 'image',
scale: 30,
maxPixels: 10000000000000,
fileFormat: 'GeoTIFF',
crs : 'EPSG:4326'
});
If I change the scale parameter in the export function to 1000, which is my objective, GEE will interpolate pixels to decrease the resolution, but not sum their value, which is my objective.