Skip to content

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

Open

Description

@craigds

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?

Activity

  1. springmeyer commented on Feb 16, 2023

    @springmeyer
    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.

  2. craigds commented on Feb 16, 2023

    @craigds
    Author

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions