Stay organized with collections
Save and categorize content based on your preferences.
Get a download URL for small chunks of image data in GeoTIFF or NumPy format. Maximum request size is 32 MB, maximum grid dimension is 10000.
Use getThumbURL for RGB visualization formats PNG and JPG.
Returns returns a download URL, or undefined if a callback was specified.
Usage
Returns
Image.getDownloadURL(params, callback)
Object|String
Argument
Type
Details
this: image
Image
The Image instance.
params
Object
An object containing download options with the following possible values:
name: a base name to use when constructing filenames. Only applicable when format is "ZIPPED_GEO_TIFF" (default) or filePerBand is true. Defaults to the image id (or "download" for computed images) when format is "ZIPPED_GEO_TIFF" or filePerBand is true, otherwise a random character string is generated. Band names are appended when filePerBand is true.
bands: a description of the bands to download. Must be an array of band names or an array of dictionaries, each with the following keys (optional parameters apply only when filePerBand is true):
id: the name of the band, a string, required.
crs: an optional CRS string defining the band projection.
crs_transform: an optional array of 6 numbers specifying an affine transform from the specified CRS, in row-major order: [xScale, xShearing, xTranslation, yShearing, yScale, yTranslation]
dimensions: an optional array of two integers defining the width and height to which the band is cropped.
scale: an optional number, specifying the scale in meters of the band; ignored if crs and crs_transform are specified.
crs: a default CRS string to use for any bands that do not explicitly specify one.
crs_transform: a default affine transform to use for any bands that do not specify one, of the same format as the
crs_transform of bands.
dimensions: default image cropping dimensions to use for any bands that do not specify them.
scale: a default scale to use for any bands that do not specify one; ignored if crs and
crs_transform are specified.
region: a polygon specifying a region to download; ignored if crs and crs_transform is specified.
filePerBand: whether to produce a separate GeoTIFF per band (boolean). Defaults to true. If false, a single GeoTIFF is produced and all band-level transformations will be ignored.
format: the download format. One of:
"ZIPPED_GEO_TIFF" (GeoTIFF file(s) wrapped in a zip file, default)
"GEO_TIFF" (GeoTIFF file)
"NPY" (NumPy binary format)
If "GEO_TIFF" or "NPY", filePerBand and all band-level transformations will be ignored. Loading a NumPy output results in a structured array.
callback
Function, optional
An optional callback. If not supplied, the call is made synchronously.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-02-20 UTC."],[[["`Image.getDownloadURL` provides a URL to download image data in GeoTIFF, NumPy, PNG or JPG formats."],["Request size is limited to 32 MB and grid dimension to 10000."],["Use `getThumbURL` for RGB visualizations in PNG and JPG formats."],["Specify download parameters like bands, region, scale, and format within the `params` object."],["The function returns a download URL or undefined if a callback is used."]]],[]]