raster_tools.Raster.get_bands#
- Raster.get_bands(bands)[source]#
Retrieve the specified bands as a new Raster. Indexing starts at 1.
- Parameters
bands (int or sequence of ints) – The band or bands to be retrieved. A single band Raster is returned if bands is an int and a multiband Raster is returned if it is a sequence. The band numbers may be out of order and contain repeated elements. if bands is a sequence, the multiband raster’s bands will be in the order provided.
- Returns
The resulting raster composed of the specified bands in the order given.
- Return type