Show:

An encapsulation of a Group's descendant arrays.

Methods

count () Number

Returns the number of arrays in the collection.

Returns:

Number
countAsync
(
  • callback=undefined
)
Promise

Returns the number of arrays in the collection. 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 arrays using a callback function.

Parameters:

  • callback forEachCb

    The callback to be called with each MDArray

Example:

group.arrays.forEach(function(array, i) { ... });`
get
(
  • array
)
gdal.MDArray

Returns the array with the given name/index.

Parameters:

  • array String | Number

Returns:

getAsync
(
  • array
  • callback=undefined
)
Promise

Returns the array with the given name/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:

  • array String | 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 arrays using a callback function and builds an array of the returned values.

Parameters:

  • callback mapCb

    The callback to be called with each MDArray

Returns:

U[]

Example:

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

Iterates through all arrays using an async iterator

Example:

for await (const array of group.arrays) {
}
Symbol.iterator ()

Iterates through all arrays using an iterator

Example:

for (const array of group.arrays) {
}

Attributes

ds

gdal.Dataset readonly

Parent dataset

names

String readonly