src / pysoilmap / ee.py

download_image

download_image(image, bands=None, *, crs, transform, xdim, ydim, format='NPY', xtile=1, ytile=1, threads=1)[source]

Download a small image (<=50MB) from Google Earth Engine API.

Parameters:
  • bands – list of band names to download

  • crs – name of the coordinate system

  • transform[xscale, xshear, xoffs, yshear, yscale, yoffs]

  • xdim – image width in pixels

  • ydim – image height in pixels

  • format – file format, leave as ‘NPY’ for now!

  • xtile – download image in xtile * ytile pieces

  • ytile – download image in xtile * ytile pieces

  • threads – number of threads for tiled download

Note that transform defines the transformation of (col, row) to coordinates. In order to have the (0, 0) pixel in the upper left corner transform should be: [xmin, 0, xscale, 0, -yscale, ymax].