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

Method addBands

python/ee/image.py:720–748  ·  view source on GitHub ↗

Returns an image containing all bands. Bands are 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. Args: srcImg: A

(
      self,
      srcImg: _arg_types.Image,  # pylint: disable=invalid-name
      names: _arg_types.List | None = None,
      overwrite: _arg_types.Bool | None = None,
  )

Source from the content-addressed store, hash-verified

718 return apifunction.ApiFunction.call_(self.name() + '.add', self, image2)
719
720 def addBands(
721 self,
722 srcImg: _arg_types.Image, # pylint: disable=invalid-name
723 names: _arg_types.List | None = None,
724 overwrite: _arg_types.Bool | None = None,
725 ) -> Image:
726 """Returns an image containing all bands.
727
728 Bands are copied from the first input and selected bands from the second
729 input, optionally overwriting bands in the first image with the same name.
730
731 The new image has the metadata and footprint from the first input image.
732
733 Args:
734 srcImg: An image containing bands to copy.
735 names: Optional list of band names to copy. If names is omitted, all bands
736 from srcImg will be copied over.
737 overwrite: If true, bands from `srcImg` will override bands with the same
738 names in `dstImg`. Otherwise the new band will be renamed with a
739 numerical suffix (`foo` to `foo_1` unless `foo_1` exists, then `foo_2`
740 unless it exists, etc).
741
742 Returns:
743 An ee.Image.
744 """
745
746 return apifunction.ApiFunction.call_(
747 self.name() + '.addBands', self, srcImg, names, overwrite
748 )
749
750 def And(self, image2: _arg_types.Image) -> Image:
751 """Returns 1 if both values are non-zero; otherwise 0.

Callers 15

test_reuseMethod · 0.95
test_iterationMethod · 0.80
test_castMethod · 0.80
test_add_bandsMethod · 0.80
AsyncInspector.jsFile · 0.80
createTimeBandFunction · 0.80
QualityMosaic.jsFile · 0.80

Calls 2

nameMethod · 0.95
call_Method · 0.80

Tested by 4

test_reuseMethod · 0.76
test_iterationMethod · 0.64
test_castMethod · 0.64
test_add_bandsMethod · 0.64