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 :)
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to