Global

Methods

(async) initGdalJs(config) → {Promise.<Gdal>}

Asynchronously initializes gdal3.js

Parameters:
Name Type Description
config Object

Configuration Object.

Name Type Default Description
path string

Parent path of wasm and data files.

paths Object

Use if filenames differ from gdal3WebAssembly.(data|wasm) and gdal3.js.

Name Type Description
wasm string

Wasm file path. (Default: gdal3WebAssembly.wasm)

data string

Data file path. (Default: gdal3WebAssembly.data)

js string

Js file path for web worker. (Default: gdal3.js)

dest string

Destination path where the created files will be saved. (Node.js only)

useWorker boolean true

Using Web Workers on the browser. It doesn't work on Node.js.

env Object

Set global Gdal configuration https://gdal.org/user/configoptions.html#global-configuration-options

logHandler LogHandler

User-defined function to be called in case of log.

errorHandler LogHandler

User-defined function to be called in case of error.

Returns:
Type:
Promise.<Gdal>

"Promise" returns Gdal namespace.

Type Definitions

LogHandler(message, type)

Parameters:
Name Type Description
message string

Log message

type string

Log type (e.g. stderr, stdout)