gdal3.js icon indicating copy to clipboard operation
gdal3.js copied to clipboard

Add support for 'open options'

Open mthh opened this issue 3 years ago • 0 comments

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.

mthh avatar Oct 07 '22 07:10 mthh