[gdal-dev] vsis3/vsicurl allowed-extensions per path?

Robert Coup robert.coup at koordinates.com
Wed Oct 10 06:38:51 PDT 2018


Hi all,

Wondering about being able to set CPL_VSIL_CURL_ALLOWED_EXTENSIONS on a
specific dataset rather than as a global option. This would allow opening
multiple files in the same process without needing to manage setting &
resetting configuration contexts.

eg. gdal.Open("/vsis3?ext=.tif/mybucket/mypath/my.tif", ...)

would be the equivalent of CPL_VSIL_CURL_ALLOWED_EXTENSIONS=.tif *for that
dataset only*.

eg. gdal.Open("/vsis3?ext=.tif&ext=.tif.aux.xml/mybucket/mypath/my.tif",
...)

would be the equivalent of
CPL_VSIL_CURL_ALLOWED_EXTENSIONS=.tif,.tif.aux.xml

(to simplify the first case, maybe `?ext` could be the equivalent of
whatever extension is on the path)

I'm not entirely happy with the approach since it pollutes the path - a
single path is now is also referring to other files (eg. what should
VSIFOpenL() conceivably do with ?ext=* ?)

Another alternative would be to have it as an Open Option to pass to
gdal.OpenEx(), though they seem designed for driver-specific options rather
than access-method.

Thoughts?

Rob :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20181010/41014f05/attachment-0001.html>


More information about the gdal-dev mailing list