a/gdal_translate

gdal_translate function can be used to convert raster data between different formats, potentially performing some operations like subsettings, resampling, and rescaling pixels in the process.

https://gdal.org/programs/gdal_translate.html

Parameters:
Name Type Attributes Description
dataset TypeDefs.Dataset

Dataset to be converted.

options Array <optional>

Options (https://gdal.org/programs/gdal_translate.html#description)

outputName string <optional>

Destination file name without extension.

Returns:
Type:
Promise.<TypeDefs.FilePath>

"Promise" returns paths of created files.

Example
const Gdal = await initGdalJs();
const dataset = (await Gdal.open('data.tif')).datasets[0];
const options = [
  '-of', 'PNG'
];
const filePath = await Gdal.gdal_translate(dataset, options);