MCPcopy
hub / github.com/google/earthengine-api / getDownloadId

Function getDownloadId

python/ee/data.py:1226–1339  ·  view source on GitHub ↗

Get a Download ID. Args: params: An object containing visualization options with the following possible values: image - The image to download. - name: a base name to use when constructing filenames. Only applicable when format is "ZIPPED_GEO_TIFF" (default),

(params: dict[str, Any])

Source from the content-addressed store, hash-verified

1224
1225
1226def getDownloadId(params: dict[str, Any]) -> dict[str, str]:
1227 """Get a Download ID.
1228
1229 Args:
1230 params: An object containing visualization options with the following
1231 possible values:
1232 image - The image to download.
1233 - name: a base name to use when constructing filenames. Only applicable
1234 when format is "ZIPPED_GEO_TIFF" (default),
1235 "ZIPPED_GEO_TIFF_PER_BAND", or filePerBand is true. Defaults to the
1236 image id (or "download" for computed images) when format is
1237 "ZIPPED_GEO_TIFF", "ZIPPED_GEO_TIFF_PER_BAND", or filePerBand is
1238 true, otherwise a random character string is generated. Band names
1239 are appended when filePerBand is true.
1240 - bands: a description of the bands to download. Must be an array of
1241 band names or an array of dictionaries, each with the
1242 following keys:
1243 + id: the name of the band, a string, required.
1244 + crs: an optional CRS string defining the band projection.
1245 + crs_transform: an optional array of 6 numbers specifying an affine
1246 transform from the specified CRS, in the order:
1247 [xScale, yShearing, xShearing, yScale, xTranslation, yTranslation]
1248 + dimensions: an optional array of two integers defining the width and
1249 height to which the band is cropped.
1250 + scale: an optional number, specifying the scale in meters of the
1251 band; ignored if crs and crs_transform are specified.
1252 - crs: a default CRS string to use for any bands that do not explicitly
1253 specify one.
1254 - crs_transform: a default affine transform to use for any bands that do
1255 not specify one, of the same format as the crs_transform of bands.
1256 - dimensions: default image cropping dimensions to use for any bands
1257 that do not specify them.
1258 - scale: a default scale to use for any bands that do not specify one;
1259 ignored if crs and crs_transform is specified.
1260 - region: a polygon specifying a region to download; ignored if crs
1261 and crs_transform are specified.
1262 - filePerBand: whether to produce a separate GeoTIFF per band (boolean).
1263 Defaults to true. If false, a single GeoTIFF is produced and all
1264 band-level transformations will be ignored. Note that this is
1265 ignored if the format is "ZIPPED_GEO_TIFF" or
1266 "ZIPPED_GEO_TIFF_PER_BAND".
1267 - format: the download format. One of:
1268 "ZIPPED_GEO_TIFF" (GeoTIFF file wrapped in a zip file, default),
1269 "ZIPPED_GEO_TIFF_PER_BAND" (Multiple GeoTIFF files wrapped in a
1270 zip file), "GEO_TIFF" (GeoTIFF file), "NPY" (NumPy binary format).
1271 If "GEO_TIFF" or "NPY", filePerBand and all band-level
1272 transformations will be ignored. Loading a NumPy output results in
1273 a structured array.
1274 - id: deprecated, use image parameter.
1275
1276 Returns:
1277 A dict containing a docid and token.
1278 """
1279 params = params.copy()
1280 # Previously, the docs required an image ID parameter that was changed
1281 # to image. Due to the circular dependency, we raise an error and ask the
1282 # user to supply an ee.Image directly.
1283 if 'id' in params:

Callers

nothing calls this directly

Calls 9

_execute_cloud_callFunction · 0.85
_get_cloud_projectsFunction · 0.85
_get_projects_pathFunction · 0.85
thumbnailsMethod · 0.80
encodeMethod · 0.45
getMethod · 0.45
createMethod · 0.45

Tested by

no test coverage detected