'How to export Google Earth Engine images to local files using Python

I'm producing a ge image using this code:

image = ee.ImageCollection(satellite) \
            .filterDate(startdate, enddate) \
            .filterBounds(ee.Geometry.Point(centroid[0], centroid[1])) \
            .select(bands) \
            .map(removeClouds) \
            .mean()
type(image)

<class 'ee.image.Image'>

How can I save the resulting image as a local GeoTIFF file, that is, a file stored in the desktop machine that's running the script?



Solution 1:[1]

You cannot download it directly to your local directory. As explained here, "Because Google Earth Engine data exports are asyncronous, the destinations are also cloud-based. Your options are Google Drive, Google Cloud Storage, or new assets in Earth Engine."

For extracting images from Google Drive, this answer can help you.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 ablmmcu