Show:

An encapsulation of a Dataset's raster bands.

var bands = dataset.bands;`

Table of Contents

Methods

count () Integer

Returns the number of bands.

Returns:

Integer
create
(
  • dataType
)
gdal.RasterBand

Adds a new band.

Parameters:

Returns:

forEach
(
  • callback
)

Defined in lib/gdal.js:121

Iterates through all bands using a callback function. Note: GDAL band indexes start at 1, not 0.

Parameters:

  • callback Function

    The callback to be called with each RasterBand

Example:

dataset.bands.forEach(function(band, i) { ... });`
get
(
  • id
)
gdal.RasterBand

Returns the band with the given ID.

Parameters:

  • id Integer

Returns:

map
(
  • callback
)

Defined in lib/gdal.js:140

Iterates through all bands using a callback function and builds an array of the returned values.

Parameters:

  • callback Function

    The callback to be called with each RasterBand

Example:

var result = dataset.bands.map(function(band, i) {
    return value;
});`

Attributes

ds

gdal.Dataset readonly

Parent dataset