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

4.x can't use gdal plugin with /vsi paths #988

Open
craigds opened this issue Feb 16, 2023 · 2 comments
Open

4.x can't use gdal plugin with /vsi paths #988

craigds opened this issue Feb 16, 2023 · 2 comments

Comments

@craigds
Copy link

craigds commented Feb 16, 2023

node-mapnik's gdal plugin doesn't follow GDAL's virtual filesystem (/vsicurl or /vsis3) paths for some reason.

Background: here's a small TIF file in S3

root@cff8afe58600:/app# gdalinfo -nomd /vsicurl/https://kx-craig-misc-test-bucket.s3.ap-southeast-2.amazonaws.com/v4-8018-5194.tif
Driver: GTiff/GeoTIFF
Files: /vsicurl/https://kx-craig-misc-test-bucket.s3.ap-southeast-2.amazonaws.com/v4-8018-5194.tif
Size is 8453, 16384
...

However, this minimal JS script using node-mapnik can't seem to load it:

root@cff8afe58600:/app# ./test-vsis3-url.js
ERROR 4: /vsicurl/https://kx-craig-misc-test-bucket.s3.ap-southeast-2.amazonaws.com/v4-8018-5194.tif: No such file or directory
[Error: /vsicurl/https://kx-craig-misc-test-bucket.s3.ap-southeast-2.amazonaws.com/v4-8018-5194.tif: No such file or directory  encountered during parsing of layer 'x' in Layer]

versions:

  • Tested (failing) with node-mapnik 4.0.0 and 4.5.9.
  • It previously worked fine for us using a really old version (1.4.15)

It looks like the gdal plugin is statically compiled these days (so no longer depends on having libgdal installed separately at runtime). Any idea what version of GDAL it's pulling in and how it's building it?

@springmeyer
Copy link
Member

Hi @craigds - right, I think the statically compiled GDAL linked into the plug-in is likely the limitation. My understanding is that VSI needs curl and linking curl statically would have been quite involved due to the need for OpenSSL for SSL support in curl.

So I doubt this is a GDAL version issue as much as how it was compiled in the binaries provided.

If fixing this is important, feel free to reach out to me by email to discuss.

@craigds
Copy link
Author

craigds commented Feb 16, 2023

that makes sense, thanks. Is it possible to build it without static linking? I looked for docs on this but didn't find much yet. I'm not a JS native so forgive me if I've overlooked something really basic

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

2 participants