1

I wish to download the raster image of precipitation data.

Is that possible? I think I'm doing something wrong when I export it.

Here is my code:

//Rain 
var lluvia = ee.ImageCollection('JAXA/GPM_L3/GSMaP/v6/operational')
.map(function(im){return im.clip(Uy);})
.filter(ee.Filter.date('2021-01-25', '2021-02-02'));
print(lluvia.size());
var precipitation = lluvia.select('hourlyPrecipRate');
var cumPrec = precipitation.sum();
Map.addLayer(cumPrec, vislluvia, 'Lluvias');

Export.image.toDrive({image: cumPrec,
description: "Imagen",
folder: "gee_data", 
fileNamePrefix: "Imagen",
region: Uy,
scale: 30,
shardSize: 100,
fileDimensions: 5000,
fileFormat: "GeoTIFF"
 
})
4
  • 1
    Can you provide the full script for better help, Claudio. It's hard to know what is the issue without having all the parameters and variables.
    – AdoMath
    Commented Feb 3, 2021 at 9:39
  • Here is the link <code.earthengine.google.com/…> Commented Feb 3, 2021 at 12:46
  • I get a message saying your repository "Curso_SIG_LE" is not existing, maybe you need to include the original script or make sure to have the repositories public.
    – AdoMath
    Commented Feb 3, 2021 at 13:01
  • I'm not sure why it shows that message, but the whole code its exactly what's shown in the publication, where "Uy" its just a polygon. Commented Feb 3, 2021 at 13:33

1 Answer 1

1

To me it seems that the issue could be either the function .map(function(im){return im.clip(Uy);}) you are running in the ImageCollection or that the export is working fine, but you thought the result would look otherwise.

If you are using that function just to reduce the area for export, don't worry, because when you specify the region in export function, it does that automatically. For simplicity though you can have that function outside the ImageCollection like this:

function crop(image) { 
  var cropped = image.clip(Uy);
  return cropped
}

So then your ImageCollection looks like this:

//Rain 
var lluvia = ee.ImageCollection('JAXA/GPM_L3/GSMaP/v6/operational')
.filter(ee.Filter.date('2021-01-25', '2021-02-02'))
.map(crop);

The export function seems to be okey, but the dataset has a course resolution, meaning that you will have nice results only when the region is big. That is why having Uy was important for answering the question.

1
  • Excatly, Uy is a polygon of the country Uruguay! Commented Feb 3, 2021 at 16:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.