[gdal-dev] gdalwarp creates a bloated file

Even Rouault even.rouault at mines-paris.org
Sat Dec 22 04:52:33 EST 2007


Le Saturday 22 December 2007 09:20:57 Craig Leat, vous avez écrit :
> Thanks for the info Robert. I checked the GeoTiff documentation
> (http://www.gdal.org/frmt_gtiff.html) and found the option:
> COMPRESS=[JPEG/LZW/PACKBITS/DEFLATE/CCITTRLE/CCITTFAX3/CCITTFAX4/NONE]
> However, using COMPRESS I get the following on my build of gdal 1.4.4.0:
> Warning 5: COMPRESS=CCITTFAX4 value not recognised, ignoring.
> COMPRESSION appears to work. Is this an error in the documentation?
>
> I tried: gdalwarp -co "NBITS=1" -co "COMPRESSION=CCITTFAX4"
> sheet10.tif sheet10_nu5.tif, but it makes no difference to the file
> size and gdalinfo does not show the presence of NBITS or COMPRESSION
> in the warped file.
>
> Any ideas on what I am doing wrong?

Hi,

you definitely need GDAL 1.5.0RC2 to use CCITTFAX4 compression method. This 
compression method didn't exist in the GDAL 1.4.X series. The online 
documentation you're refering to is always against latest development version 
(svn trunk), and not stable one, thus the confusion.

Please note too that the keyword is COMPRESS and not COMPRESSION. So if you 
can upgrade to GDAL 1.5.0RC2, you should rather use :
gdalwarp -co "NBITS=1" -co "COMPRESS=CCITTFAX4"

Best regards,
Even


More information about the gdal-dev mailing list