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

Unable to create new FileGDB (.gdb) file #86

Closed ok958726 closed 1 year ago

ok958726 commented 1 year ago

I use the following code to create a new .gdb format file:

const driver= gdal.drivers.get('OpenFileGDB');

const datasetOut = driver.create('test.gdb');

datasetOut.layers.create('test', null, gdal.wkbPoint);

datasetOut.close();

But the program reports an error at driver.create('test.gdb'):Only vector datasets supported

I am using windows 11 system, node version 16.16, gdal-async version: 3.6.4

ok958726 commented 1 year ago

I found out that the gdal.vectorTranslate method can be used to create a new FileGDB https://github.com/mmomtchev/node-gdal-async/issues/84#issuecomment-1560401953

mmomtchev commented 1 year ago

In GDAL 3.6, OpenFileGDB supports read-write operations only on vector datasets. In the very recent GDAL 3.7, read-only support for raster files has been added. Creating a new raster file is not currently possible.