Show:

An encapsulation of a Dataset's vector layers.

var layers = dataset.layers;`

Methods

copy
(
  • src_lyr_name
  • dst_lyr_name
  • options=null
)
gdal.Layer

Copies a layer.

Parameters:

  • src_lyr_name String
  • dst_lyr_name String
  • [options=null] Object | String[] optional

    layer creation options

Returns:

count () Integer

Returns the number of layers.

Returns:

Integer
create
(
  • name
  • srs
  • geomType
  • creation_options
)
gdal.Layer

Adds a new layer.

Parameters:

  • name String

    Layer name

  • srs gdal.SpatialReference | Null

    Layer projection

  • geomType Integer | Function

    Geometry type or constructor (see geometry types)

  • creation_options String[] | Object

    driver-specific layer creation options

Returns:

Example:

dataset.layers.create('layername', null, gdal.Point);
forEach
(
  • callback
)

Defined in lib/gdal.js:277

Iterates through all layers using a callback function.

Parameters:

  • callback Function

    The callback to be called with each Layer

Example:

dataset.layers.forEach(function(layer, i) { ... });`
get
(
  • key
)
gdal.Layer

Returns the layer with the given name or identifier.

Parameters:

  • key String | Integer

    Layer name or ID.

Returns:

map
(
  • callback
)

Defined in lib/gdal.js:290

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

Parameters:

  • callback Function

    The callback to be called with each Layer

Example:

var result = dataset.layers.map(function(field, i) {
    return value;
});`
remove
(
  • index
)

Removes a layer.

Parameters:

  • index Integer

Attributes

ds

gdal.Dataset readonly

Parent dataset