mmomtchev / node-gdal-async

Node.js bindings for GDAL (Geospatial Data Abstraction Library) with full async support
https://mmomtchev.github.io/node-gdal-async/
Apache License 2.0
129 stars 26 forks source link

Specifying a type conversion when reading raster data does not work #92

Closed mmomtchev closed 1 year ago

mmomtchev commented 1 year ago

When reading raster data it should be possible to request a type conversion even with automatic buffer allocation:

const data = band.pixels.read(1, 1, 20, 30, undefined, { data_type: gdal.GDT_Float64 })

This option is currently broken.

mmomtchev commented 1 year ago

The options was previously implemented as type but documented as data_type. For compatibility, both will work from now on.

mmomtchev commented 1 year ago

Fixed by #91