Show:

An encapsulation of a RasterBand overview functionality.

Methods

count () Number

Returns the number of overviews.

Returns:

Number
countAsync
(
  • callback=undefined
)
Promise

Returns the number of overviews. Asynchronous version. If the last parameter is a callback, then this callback is called on completion and undefined is returned. All optional parameters before the callback can be omitted so the callback parameter can be at any position as long as it is the last parameter. Otherwise the function returns a Promise resolved with the result.

Parameters:

  • [callback=undefined] Callback optional

    standard Node.js (error, result) callback. It is always the last parameter and can be specified even if certain optional parameters are omitted. On error error is an Error object and result is undefined. On success error is null and result contains the result. The function returns a Promise when the callback is undefined. The return value is undefined when a callback is provided. Argument type errors are thrown synchronously even when a callback is provided. In Promise mode all errors result in a rejected Promise.

Returns:

Promise
forEach
(
  • callback
)

Iterates through all overviews using a callback function.

Parameters:

  • callback forEachCb

    The callback to be called with each RasterBand

Example:

band.overviews.forEach(function(array, i) { ... });`
get
(
  • index
)
gdal.RasterBand

Fetches the overview at the provided index.

Parameters:

  • index Number

    0-based index

Returns:

getAsync
(
  • index
  • callback=undefined
)
Promise

Fetches the overview at the provided index. Asynchronous version. If the last parameter is a callback, then this callback is called on completion and undefined is returned. All optional parameters before the callback can be omitted so the callback parameter can be at any position as long as it is the last parameter. Otherwise the function returns a Promise resolved with the result.

Parameters:

  • index Number

    0-based index

  • [callback=undefined] callback optional

    standard Node.js (error, result) callback. It is always the last parameter and can be specified even if certain optional parameters are omitted. On error error is an Error object and result is undefined. On success error is null and result contains the result. The function returns a Promise when the callback is undefined. The return value is undefined when a callback is provided. Argument type errors are thrown synchronously even when a callback is provided. In Promise mode all errors result in a rejected Promise.

Returns:

Promise
getBySampleCount
(
  • samples
)
gdal.RasterBand

Fetch best sampling overview.

Returns the most reduced overview of the given band that still satisfies the desired number of samples. This function can be used with zero as the number of desired samples to fetch the most reduced overview. The same band as was passed in will be returned if it has not overviews, or if none of the overviews have enough samples.

Parameters:

  • samples Number

Returns:

getBySampleCountAsync
(
  • samples
  • callback=undefined
)
Promise

Fetch best sampling overview. Asynchronous version. If the last parameter is a callback, then this callback is called on completion and undefined is returned. All optional parameters before the callback can be omitted so the callback parameter can be at any position as long as it is the last parameter. Otherwise the function returns a Promise resolved with the result.

Returns the most reduced overview of the given band that still satisfies the desired number of samples. This function can be used with zero as the number of desired samples to fetch the most reduced overview. The same band as was passed in will be returned if it has not overviews, or if none of the overviews have enough samples.

Parameters:

  • samples Number
  • [callback=undefined] callback optional

    standard Node.js (error, result) callback. It is always the last parameter and can be specified even if certain optional parameters are omitted. On error error is an Error object and result is undefined. On success error is null and result contains the result. The function returns a Promise when the callback is undefined. The return value is undefined when a callback is provided. Argument type errors are thrown synchronously even when a callback is provided. In Promise mode all errors result in a rejected Promise.

Returns:

Promise
map<U>
(
  • callback
)
U[]

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

Parameters:

  • callback mapCb

    The callback to be called with each RasterBand

Returns:

U[]

Example:

var result = band.overviews.map(function(array, i) {
    return value;
});`
Symbol.asyncIterator ()

Iterates through all overviews using an async iterator

Example:

for await (const array of band.overviews) {
}
Symbol.iterator ()

Iterates through all overviews using an iterator

Example:

for (const array of band.overviews) {
}