Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pointer 'hDS' is NULL in 'GDALGetFileList' #77

Open
shalini-whiz opened this issue Jul 16, 2024 · 2 comments
Open

Pointer 'hDS' is NULL in 'GDALGetFileList' #77

shalini-whiz opened this issue Jul 16, 2024 · 2 comments

Comments

@shalini-whiz
Copy link

Hi, I am trying to convert .osm file into a kml file and then into a shape file using ogr2ogr on the node server. This is the code snippet, but it ends up with the error "Pointer 'hDS' is NULL in 'GDALGetFileList'.

const Gdal = await initGdalJs();
const dataset = (await Gdal.open(filePath)). datasets[0];
const options = ['-f', 'KML','-t_srs', 'EPSG:3819'];
const result = await Gdal.ogr2ogr(dataset, options);

@bugra9
Copy link
Owner

bugra9 commented Jul 29, 2024

Hi @shalini-whiz,

Can you share all logs? If there are no other logs, you can create a function to write them to the file and pass them as logHandler and errorHandler as parameters when calling initGdalJs. Thus all logs will be written to the file.

https://gdal3.js.org/docs/global.html#initGdalJs

@disarticulate
Copy link

one issue I ran into is using the -sql option and extra whitespace on the following command. The error is basically a catchall "failed to create file" seems like

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants