geetools.batch.Export.map.toCloudStorage#

static geetools.batch.Export.map.toCloudStorage(image, description='myExportMapTask', bucket=None, fileFormat=None, path=None, writePublicTiles=None, maxZoom=None, scale=None, minZoom=None, region=None, skipEmptyTiles=None, mapsApiKey=None, bucketCorsUris=None, priority=None, **kwargs)#

Creates a task to export an Image as a pyramid of map tiles.

Exports a rectangular pyramid of map tiles for use with web map viewers. The map tiles will be accompanied by a reference index.html file that displays them using the Google Maps API, and an earth.html file for opening the map on Google Earth.

Parameters:
  • image – The image to export as tiles.

  • description – Human-readable name of the task.

  • bucket – The destination bucket to write to.

  • fileFormat – The map tiles’ file format, one of ‘auto’, ‘png’, or ‘jpeg’. Defaults to ‘auto’, which means that opaque tiles will be encoded as ‘jpg’ and tiles with transparency will be encoded as ‘png’.

  • path – The string used as the output’s path. A trailing ‘/’ is optional. Defaults to the task’s description.

  • writePublicTiles – Whether to write public tiles instead of using the bucket’s default object ACL. Defaults to True and requires the invoker to be an OWNER of bucket.

  • maxZoom – The maximum zoom level of the map tiles to export.

  • scale – The max image resolution in meters per pixel, as an alternative to ‘maxZoom’. The scale will be converted to the most appropriate maximum zoom level at the equator.

  • minZoom – The optional minimum zoom level of the map tiles to export.

  • region – The lon,lat coordinates for a LinearRing or Polygon specifying the region to export. Can be specified as a nested lists of numbers or a serialized string. Map tiles will be produced in the rectangular region containing this geometry. Defaults to the image’s region.

  • skipEmptyTiles – If true, skip writing empty (i.e. fully-transparent) map tiles. Defaults to false.

  • mapsApiKey – Used in index.html to initialize the Google Maps API. This removes the “development purposes only” message from the map.

  • bucketCorsUris – A list of domains that are allowed to retrieve the exported tiles from JavaScript. Setting the tiles to public is not enough to allow them to be accessible by a web page, so you must explicitly give domains access to the bucket. This is known as Cross-Origin-Resource-Sharing, or CORS. You can allow all domains to have access using “*”, but this is generally discouraged. See https://cloud.google.com/storage/docs/cross-origin for more details.

  • priority – The priority of the task within the project. Higher priority tasks are scheduled sooner. Must be an integer between 0 and 9999. Defaults to 100.

  • **kwargs – Holds other keyword arguments that may have been deprecated such as ‘crs_transform’.

Returns:

An unstarted Task that exports the image to Google Cloud Storage.