[gdal-dev] python: set CacheMax to percent, MB, GB?
Even Rouault
even.rouault at spatialys.com
Thu Jun 17 10:49:11 PDT 2021
Le 17/06/2021 à 19:44, Matt.Wilkie at yukon.ca a écrit :
>
> 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.
>
> Thanks! …/Later/: How to use it? It doesn’t seem to work for me:
>
That's exacly what I wrote :-) you can't use
gdal.SetConfigOption('GDAL_CACHEMAX', string) after calling
gdal.SetCacheMax/GetCacheMax. You need to use gdal.SetCacheMax() after.
That's not to annoy users, but we just don't want to pay the cost of
reading an environment variable each time GDALGetCacheMax() is used
internally, potentially in time critical code paths, so it is read just
once.//
--
http://www.spatialys.com
My software is free, but my time generally not.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20210617/903fe1f2/attachment.html>
More information about the gdal-dev
mailing list