Returns an image containing all bands copied from the first input and selected bands from the second input, optionally overwriting bands in the first image with the same name. The new image has the metadata and footprint from the first input image.
Usage | Returns |
---|---|
Image.addBands(srcImg, names, overwrite) | Image |
Argument | Type | Details |
---|---|---|
this: dstImg | Image | An image into which to copy bands. |
srcImg | Image | An image containing bands to copy. |
names | List, default: null | Optional list of band names to copy. If names is omitted, all bands from srcImg will be copied over. |
overwrite | Boolean, default: false | If true, bands from srcImg will override bands with the same names in dstImg. Otherwise the new band will be renamed with a numerical suffix ('foo' to 'foo_1' unless 'foo_1' exists, then 'foo_2' unless it exists, etc). |
Examples
JavaScript
// Your example goes here!
Python
# Your example goes here!