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
133 stars 26 forks source link

gdal.open() does not accept driver specific Open Options #24

Closed robinsummerhill closed 2 years ago

robinsummerhill commented 2 years ago

GDAL drivers can implement driver-specific options used when opening datasets. For example, the GeoJSON driver implements a DATE_AS_STRING option to control how dates are interpreted when opening a GeoJSON file.

The C API allows you to specify these options when opening a dataset with GDALOpenEx() but this is not possible using the NodeJS bindings.

gdal.open() should be extended to allow passing driver-specific Open Options.

mmomtchev commented 2 years ago

I am adding this for 3.5, but in the meantime you can use gdal.config.set('OGR_GEOJSON_DATE_AS_STRING', 'ON')

robinsummerhill commented 2 years ago

Thank you! I thought it might be possible with gdal.config but couldn't work out the right key name.