[gdal-dev] python: set CacheMax to percent, MB, GB?
even.rouault at spatialys.com
Thu Jun 17 10:21:10 PDT 2021
Le 17/06/2021 à 19:14, Matt.Wilkie at yukon.ca a écrit :
> I see in https://gdal.org/python/osgeo.gdal-module.html#SetCacheMax
> <https://gdal.org/python/osgeo.gdal-module.html#SetCacheMax> we set
> the value using bytes. Is there a prebuilt method to convert units
> like percent, megabytes, gigabytes to bytes or is it up to us to build
up to the user
you could also call gdal.SetConfigOption('GDAL_CACHEMAX', string), but
you need to do that *before* reading any raster in the process (or any
call to gdal.SetCacheMax/GetCacheMax), otherwise it will be ignored.
My software is free, but my time generally not.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gdal-dev