[gdal-dev] Re: gdalwarp -co COMPRESS issues

Jukka Rahkonen jukka.rahkonen at mmmtike.fi
Sun Mar 16 11:38:55 EDT 2008


Maciej Sieczka <tutey <at> o2.pl> writes:

> Since gdalwarp supports compressing tiffs, who would guess he has to do 
> something extra? gdalwarp makes an impression of being able to warp and 
> compress in one step. Not many users will expect that gdalwarp writes a 
> compressed TIFF bigger than not compressed, and that he has to fix this 
> with gdal_translate afterwards.

For my mind this gdalwarp - LZW compression bug could be well enough corrected
by adding a line to gdalwarp documantation saying that it is not recommended
without preliminary test with actual image data.

I don't know if an effective LZW compression is possible to perform in warping
situation, when the compressor should be able to compress a stream of warped
data without knowing before hand what will follow.  Perhaps it is, for example
line by line, but with some other compressing methods it is for sure not.  I
believe that having two runs, first warp to uncompressed file and then
compressing it will not take very much longer time.  LZW compression is rather a
a fast process compared to warping. I do understand that this is mostly a
question of principle: if it is possible to do then it should do it right and
you would be happy if it is deactivated.  For example one cannot warp directly
with gdalwarp into ecw format but people are tolerating this limitation. Even it
is possible to do with ER Mapper products.

By the way, have you ever tried to create a tiled tiff as output?  It might give
the compressor some nice intermediate points to decide when to compress a bunch
of image data and then, perhaps, the final file size would not increase so much.

-Jukka Rahkonen-




More information about the gdal-dev mailing list