node-gdal icon indicating copy to clipboard operation
node-gdal copied to clipboard

MBTiles support

Open DenisCarriere opened this issue 7 years ago • 0 comments

I'm attempting to open a MBTiles using node-gdal and it seems to not be supported even though the GDAL version is 2.1.1.

Is there something I'm missing or do I need to build from source using my own GDAL?

gdal.version
//= '2.1.1'
gdal.drivers.getNames()
//= MBTiles not included

Error - Attempting to open MBTiles

const gdal = require('gdal')
gdal.open('example.mbtiles')
/Users/mac/Github/test/node_modules/gdal/lib/gdal.js:571
                return open.apply(gdal, arguments);
                            ^

Error: Error opening dataset
    at Object.open (/Users/mac/Github/test/node_modules/gdal/lib/gdal.js:571:15)

Edit: I've been able to build it against my own GDAL version, however I would of assumed that MBTiles would been supported by default.

$ npm install gdal --build-from-source --shared_gdal

DenisCarriere avatar Jun 21 '17 14:06 DenisCarriere