0

In the below code I want to download PM image using getDownloadURL instead of Export.image.toDrive() but returns error. How can I solve this problem?

enter image description here

code link: https://code.earthengine.google.com/2ecd8a1ea1788def648f378eb0f7b6b7

var pm = ee.ImageCollection("ECMWF/CAMS/NRT")
.filterDate('2016-01-01','2021-01-01')
.filterBounds(table)
.select('particulate_matter_d_less_than_25_um_surface')
.mean().clip(table);

print(pm)

var pmDownload = pm.getDownloadURL({
    'image': pm,
    'region': table,
    'filePerBand': 'false',
    'crs': 'EPSG:4326'
});

1 Answer 1

1

Tables are imported as feature but region argument for getDownloadURL() needs a geometry. So replace that line with

    'region': table.geometry(),

Link to corrected code.

Side note: getDownloadURL() can be used for obtaining small images only. For large images (such as the whole district or state), please use Export.image.toDrive().

Your Answer

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

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