gdal3.js
gdal3.js copied to clipboard
Add support for 'open options'
This PR add support for the dataset open options (which are format-specific and usually used behind the -oo parameter when using ogr2ogr, ogrinfo, gdalinfo, etc.) in order to fix #41.
The options must be given in the 2nd (optional) argument of Gdal.open, in a list of strings, like the following:
// Without options as before
const input = await Gdal.open(file);
// With option
const input = await Gdal.open(file, ['X_POSSIBLE_NAMES=lng', 'Y_POSSIBLE_NAMES=lat']);
I also added a test case using the open options of the CSV driver.