Show:

Format specific driver.

An instance of this class is created for each supported format, and manages information about the format.

This roughly corresponds to a file format, though some drivers may be gateways to many formats through a secondary multi-library.

Methods

copyFiles
(
  • name_old
  • name_new
)

Copy the files of a dataset.

Parameters:

  • name_old String

    New name for the dataset.

  • name_new String

    Old name of the dataset.

create
(
  • filename
  • x_size=0
  • y_size=0
  • band_count=0
  • data_type=gdal.GDT_Byte
  • creation_options
)
gdal.Dataset

Create a new dataset with this driver.

Parameters:

  • filename String
  • [x_size=0] Number optional

    raster width in pixels (ignored for vector datasets)

  • [y_size=0] Number optional

    raster height in pixels (ignored for vector datasets)

  • [band_count=0] Number optional
  • [data_type=gdal.GDT_Byte] Number optional

    pixel data type (ignored for vector datasets) (see data types)

  • [creation_options] String[] | Object optional

    An array or object containing driver-specific dataset creation options

Returns:

createAsync
(
  • filename
  • x_size=0
  • y_size=0
  • band_count=0
  • data_type=gdal.GDT_Byte
  • creation_options
  • callback=undefined
)
Promise

Asynchronously create a new dataset with this driver.

Parameters:

  • filename String
  • [x_size=0] Number optional

    raster width in pixels (ignored for vector datasets)

  • [y_size=0] Number optional

    raster height in pixels (ignored for vector datasets)

  • [band_count=0] Number optional
  • [data_type=gdal.GDT_Byte] Number optional

    pixel data type (ignored for vector datasets) (see data types)

  • [creation_options] String[] | Object optional

    An array or object containing driver-specific dataset creation options

  • [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
createCopy
(
  • filename
  • src
  • options=null
  • strict=false
  • jsoptions
)
gdal.Dataset

Create a copy of a dataset.

Parameters:

  • filename String
  • src gdal.Dataset
  • [options=null] String[] | Object optional

    An array or object containing driver-specific dataset creation options

  • [strict=false] Boolean optional

    strict mode

  • [jsoptions] CreateOptions optional

    additional options

    • [progress_cb] ProgressCb optional

      optional progress callback. In sync mode at every invocation it will stop the GDAL operation until it returns. In async mode it will schedule the invocation to be executed at the next event loop iteration while the GDAL operation will continues in the background. If the event loop is blocked and a second invocation is scheduled before the first one has been executed, the first one will be discarded. No progress callbacks will be delivered after the result callback has been triggered or the Promise has been resolved. If the event loop is blocked for the whole duration of the operation, no progress callbacks will be made at all. The callback takes two arguments, the first one, complete, is a number between 0 and 1 indicating the progress towards the operation finish and the second one, message, can be used by certain GDAL drivers to return text messages.

Returns:

createCopyAsync
(
  • filename
  • src
  • options=null
  • strict=false
  • jsoptions
  • callback=undefined
)
Promise

Asynchronously create a copy of a dataset.

Parameters:

  • filename String
  • src gdal.Dataset
  • [options=null] String[] | Object optional

    An array or object containing driver-specific dataset creation options

  • [strict=false] Boolean optional

    strict mode

  • [jsoptions] CreateOptions optional

    additional options

    • [progress_cb] ProgressCb optional

      optional progress callback. In sync mode at every invocation it will stop the GDAL operation until it returns. In async mode it will schedule the invocation to be executed at the next event loop iteration while the GDAL operation will continues in the background. If the event loop is blocked and a second invocation is scheduled before the first one has been executed, the first one will be discarded. No progress callbacks will be delivered after the result callback has been triggered or the Promise has been resolved. If the event loop is blocked for the whole duration of the operation, no progress callbacks will be made at all. The callback takes two arguments, the first one, complete, is a number between 0 and 1 indicating the progress towards the operation finish and the second one, message, can be used by certain GDAL drivers to return text messages.

  • [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
deleteDataset
(
  • filename
)

Parameters:

  • filename String
getMetadata
(
  • domain
)
Any

Returns metadata about the driver.

Parameters:

  • [domain] String optional

Returns:

Any
open
(
  • path
  • mode="r"
)
gdal.Dataset

Opens a dataset.

Parameters:

  • path String
  • [mode="r"] String optional

    The mode to use to open the file: "r" or "r+"

Returns:

openAsync
(
  • path
  • mode="r"
  • callback=undefined
)
Promise

Opens a dataset.

Parameters:

  • path String
  • [mode="r"] String optional

    The mode to use to open the file: "r" or "r+"

  • [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
rename
(
  • new_name
  • old_name
)

Renames the dataset.

Parameters:

  • new_name String

    New name for the dataset.

  • old_name String

    Old name of the dataset.

Attributes

description

String readonly