On mercredi 10 octobre 2018 14:38:51 CEST Robert Coup wrote: > 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", ...)
Hum, we should treat the path to the object as a real URL argument then, so something like /vsis3?ext=.tif&object=mybucket/path/to/my.tif with the path value being URL-encoded if needed (like the similar syntax added in 2.3 for /vsicurl/: https://gdal.org/gdal_virtual_file_systems.html#gdal_virtual_file_systems_vsicurl ) > > 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. That one would be nice, but tricky. Basically, the config option must be set at the time a Open() or Stat() action is done, but GDALOpen() has no control on when the driver will performs such actions. One could presume they will be done by the open code of the driver, but who knows if a driver might not do deferred access, after the Open() method has been completed. And such a driver is for example the GTiff driver that differ opening of side-car files until really needed (for example GetGeoTransform() will search for a .wld file if no internal georeferencing was found) Even -- Spatialys - Geospatial professional services http://www.spatialys.com _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev