toRaster at a specified index toRasterIndex. The new band’s values are copied from fromRaster at a specified band index fromBand.
If no toRasterIndex is provided, the new band is appended to the end of toRaster. If no fromBand is specified, band 1 from fromRaster is copied by default.
IllegalArgumentException will be thrown in these cases:
- The provided Rasters,
toRaster&fromRasterdon’t have same shape. - The provided
fromBandis not infromRaster. - The provided
toRasterIndexis not in or at end oftoRaster.
Signatures
Parameters
Return type
The resulting raster.

