The GeoTIFF file format

GeoTIFF is the most versatile raster format for geo-referenced imagery and is the default for all gdal utilities.

The official GDAL documentation for the geotiff file format is

  1. Optimal LZW Compression
  2. Smallest overviews

Optimal LZW Compression

Photoshop users will note that it achieves noticeably smaller files on the same data than does gdal (using the defaults). One can improve gdal compression, though still not match Photoshop, by using the -co predictor=[1/2/3] option.

gdal_translate -co compress=lzw -co predictor=2 inimage.tif outimage.tif

The default is 1 (no predictor), 2 is horizontal differencing and 3 is floating point prediction. If your image is not floating point you will not get any effect from predictor 3. For integer data (e.g. byte) choose predictor 2.

To see what compression scheme and predictor Photoshop or whatever has used on a tiff file, use the tiffinfo utility.

References 1, 2,

Smallest overviews

To produce the smallest possible JPEG-In-TIFF overviews, you should add to your gdaladdo command line:



Last modified 10 years ago Last modified on Jul 13, 2012, 3:25:32 PM
Note: See TracWiki for help on using the wiki.