[gdal-dev] Compression not applying when updating/exiting GeoTiff file in GDAL?
Even Rouault
even.rouault at spatialys.com
Fri Mar 29 03:57:18 PDT 2019
On vendredi 29 mars 2019 10:34:49 CET taylorday.assimila at gmail.com wrote:
> Thanks for your quick reply Even, you've confirmed my thoughts.
>
> My reason for having all bands in one file was to reduce I/O operations so
> that obtaining a time series (one pixel from each band) is super quick. We
> currently have a system where each time slice is a separate GeoTiff and the
> bottleneck is opening and closing each file (particularly when iterating
> over 10 years' worth of hourly data - 87600 files). We also wanted to
> include compression to create cloud-optimized GeoTiffs (COGs) to serve using
> `vsicurl` etc.
>
> If I run my `gdal_merge` command with -co INTERLEAVE=BAND as you suggest, I
> get a file with 8760 bands (with BIL) and then updating a single band is
> almost instant (no rewriting everything as only the new band needs to be
> rewritten)- so thank you! It seems that this was what I was missing and in
> the end was a very simple solution!
>
Note that if you still use compression, the size increase effect will still
apply and the file will likely grow over time if you constantly update band
data. Less dramatic as with pixel interleaving of course.
--
Spatialys - Geospatial professional services
http://www.spatialys.com
More information about the gdal-dev
mailing list