Get a Download URL for the image, which always downloads a zipped GeoTIFF. Use getThumbURL for other file formats like PNG, JPG, or raw GeoTIFF.
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. - bands: a description of the bands to download. Must be an array of dictionaries, each with the following keys: + 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 is 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 is specified. - region: a polygon specifying a region to download; ignored if crs and crs_transform is specified. - filePerBand: Whether to produce a different GeoTIFF per band (boolean). Defaults to true. If false, a single GeoTIFF is produced and all band-level transformations will be ignored. |
callback | Function, optional | An optional callback. If not supplied, the call is made synchronously. |
Examples
JavaScript
// Your example goes here!
Python
# Your example goes here!