geetools.batch.image#

TODO missing docstring.

Module Contents#

Functions#

qgisCode(image[, visParams, name, namePattern, ...])

Missing docstring.

toAsset(image, assetPath[, name, to, scale, region, ...])

This function can create folders and ImageCollections on the fly.

toDriveByFeature(image, collection, folder, namePattern)

Export an image clipped by features (Polygons). You can use the.

toLocal(image[, name, path, scale, region, ...])

Download an Image to your hard drive.

toQGIS(image[, visParams, name, filename, path, ...])

Download a python file to import from QGIS.

geetools.batch.image.qgisCode(image, visParams=None, name=None, namePattern=None, datePattern=None)[source]#

Missing docstring.

geetools.batch.image.toAsset(image, assetPath, name=None, to='Folder', scale=None, region=None, create=True, verbose=False, **kwargs)[source]#

This function can create folders and ImageCollections on the fly.

The rest is the same to Export.image.toAsset. You can pass the same params as the original function.

Parameters:
  • image (ee.Image) – the image to upload

  • assetPath (str) – path to upload the image (only PATH, without filename)

  • name (str) – filename for the image (AssetID will be assetPath + name)

  • to – where to save the image. Options: ‘Folder’ or ‘ImageCollection’

  • region (ee.Geometry.Rectangle or ee.Feature) – area to upload. default to the footprint of the first image in the collection

  • scale (int) – scale of the image (side of one pixel) (Landsat resolution)

  • dataType (str) – as downloaded images must have the same data type in all bands, you have to set it here. Can be one of: “float”, “double”, “int”, “Uint8”, “Int8” or a casting function like ee.Image.toFloat

  • notebook (bool) – display a jupyter notebook widget to monitor the task

Returns:

the tasks

Return type:

ee.batch.Task

geetools.batch.image.toDriveByFeature(image, collection, folder, namePattern, datePattern=None, scale=1000, dataType='float', verbose=False, **kwargs)[source]#

Export an image clipped by features (Polygons). You can use the.

same arguments as the original function ee.batch.export.image.toDrive.

Parameters:

Parameters:
  • image (ee.Image) – image to clip

  • collection (ee.FeatureCollection) – feature collection

  • folder (str) – same as ee.Export

  • namePattern (str) – a name pattern using image and/or feature properties between brackets. Example: ‘{ID} {a_feat_prop} {an_image_prop}’

  • datePattern (str) – a date pattern to use for {system_date} pattern in name

  • scale (int) – same as ee.Export. Default to 1000

  • dataType – as downloaded images must have the same data

type in all

bands, you have to set it here. Can be one of: “float”, “double”, “int”, “Uint8”, “Int8” or a casting function like ee.Image.toFloat

Returns:

a list of all tasks (for further processing/checking)

Return type:

list

geetools.batch.image.toLocal(image, name=None, path=None, scale=None, region=None, dimensions=None, toFolder=True)[source]#

Download an Image to your hard drive.

Parameters:
  • image (ee.Image) – the image to download

  • path (str) – the path to download the image. If None, it will be downloaded to the same folder as the script is

  • name (str) – name of the file

  • scale (int) – scale of the image to download. If None, tries to get it.

  • region (ee.Geometry) – region to from where to download the image. If None, will be the image region

:param

geetools.batch.image.toQGIS(image, visParams=None, name=None, filename=None, path=None, replace=True, verbose=False)[source]#

Download a python file to import from QGIS.