gdal.DatasetBands
An encapsulation of a Dataset's raster bands.
var bands = dataset.bands;`
Table of Contents
- Methods
- Attributes
Methods
count
()
Integer
Returns the number of bands.
Returns:
Integer
forEach
(
-
callback
Iterates through all bands using a callback function. Note: GDAL band indexes start at 1, not 0.
Parameters:
-
callback
FunctionThe callback to be called with each RasterBand
Example:
dataset.bands.forEach(function(band, i) { ... });`
Returns the band with the given ID.
Parameters:
-
id
Integer
Returns:
map
(
-
callback
Iterates through all bands using a callback function and builds an array of the returned values.
Parameters:
-
callback
FunctionThe callback to be called with each RasterBand
Example:
var result = dataset.bands.map(function(band, i) {
return value;
});`