Show:

An encapsulation of a Array's descendant attributes.

Methods

count () Number

Returns the number of attributes in the collection.

Returns:

Number
countAsync
(
  • callback=undefined
)
Promise

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

Parameters:

  • callback forEachCb

    The callback to be called with each Attribute

Example:

array.attributes.forEach(function(array, i) { ... });`
get
(
  • attribute
)
gdal.Attribute

Returns the attribute with the given name/index.

Parameters:

  • attribute String | Number

Returns:

getAsync
(
  • attribute
  • callback=undefined
)
Promise

Returns the attribute 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:

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

Parameters:

  • callback mapCb

    The callback to be called with each Attribute

Returns:

U[]

Example:

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

Iterates through all attributes using an async iterator

Example:

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

Iterates through all attributes using an iterator

Example:

for (const array of array.attributes) {
}

Attributes

ds

gdal.Dataset readonly

Parent dataset

names

String readonly