[gdal-dev] Problems compressing tiff files

Even Rouault even.rouault at mines-paris.org
Mon Feb 10 08:48:52 PST 2014


Selon Rafael Krucker <rkrucker at hsr.ch>:

> Hello all
>
> I'm currently trying to do the following, using gdal:
>
> 1) Combining some tifs into one using gdal_merge, COMPRESS=LZW
> 2) Using gdalwarp with cutline to cut out a certain piece of the result
> 3) Compressing again using gdalwarp, COMPRESS=LZW

The way gdalwarp works by default will not produce optimal compressed sizes. See
https://trac.osgeo.org/gdal/wiki/UserDocs/GdalWarp#GeoTIFFoutput-coCOMPRESSisbroken
for explanations and solutions

But if you just need to compress as it seems in your step 3, you should rather
use gdal_translate than gdalwarp. Will be faster and give optimally compressed
files out of the box.

> 4) Generating pyramids with gdaladdo
>
> However, my resulting Tiff is still very big, which hinders performance
> greatly in later steps of my workflow. I suspect that some compressions
> don't function properly, but I'm not being notified of such happenings
> if occuring.
>
> For instance, applying these steps on five tiffs each no bigger than 1.5
> MB results in a tiff of 12 GB size.
>
> Any help or suggestions would be greatly appreciated.
>
> Kind regards
> Rafael Krucker
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>




More information about the gdal-dev mailing list