[Gdal-dev] bug: gdalwarp producing larger files than no compressionat all

Ed McNierney ed at topozone.com
Thu Feb 1 16:40:11 EST 2007

Matt -

For any compression algorithm there are some data sets which will end up
being larger than uncompressed (or at least no smaller).  It is entirely
possible that the LZW compression of that file doesn't work well (LZW
isn't great for photographs, for example).

Did you try using:

	geotifcp -c lzw tr_no-comp_pix-int.tif gw_lzw-pix-rb-new.tif

To see what happens if you try to convert the uncompressed TIF to
LZW-compressed using geotifcp?  That will tell you whether there's
actually a real problem here or not.  I don't know what strip size
(rows/strip, the -r parameter to geotifcp) GDAL uses, so you may not get
identical results.  You might also try

	geotifcp -c lzw -r 1 tr_no-comp_pix-int.tif

for comparison.

	- Ed

Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA  01863
Phone: +1 (978) 251-4242
Fax: +1 (978) 251-1396
ed at topozone.com

-----Original Message-----
From: gdal-dev-bounces at lists.maptools.org
[mailto:gdal-dev-bounces at lists.maptools.org] On Behalf Of Matt Wilkie
Sent: Thursday, February 01, 2007 4:00 PM
To: gdal-dev at lists.maptools.org
Subject: [Gdal-dev] bug: gdalwarp producing larger files than no
compressionat all

Dear GDAL,

gdalwarp (fwtools 1.1.4, win32) when using combinations of resampling,
pixel interleave and compression is producing files which are larger
than if no compression at all is used, up to twice as large.

    gdalwarp -co compress=lzw -co interleave=pixel -rb \
      source.tif gw_lzw-pix-rb.tif

    gdal_translate -co compress=none -co interleave=pixel  \
      gw_lzw-pix-rb.tif tr_no-comp_pix-int.tif


    328,390 source.tif
    524,786 gw_lzw-pix-rb.tif
    328,274 tr_no-comp_pix-int.tif

I files a bug with more info and data samples at

matt wilkie
Geographic Information,
Information Management and Technology,
Yukon Department of Environment
10 Burns Road * Whitehorse, Yukon * Y1A 4Y9
867-667-8133 Tel * 867-393-7003 Fax

Gdal-dev mailing list
Gdal-dev at lists.maptools.org

More information about the Gdal-dev mailing list