[gdal-dev] Re: gdalwarp -co COMPRESS issues
Maciej Sieczka
tutey at o2.pl
Wed Mar 19 14:03:14 EDT 2008
Jukka Rahkonen pisze:
> 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.
IMO better drop the buggy feature alltogether if it is not going to be
fixed.
> 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.
Tiled tiff is not always an option. As I wrote earlier in the thread:
1. There are software that perform better with stripped TIFFs, eg.
ArcPad [1], QGIS - the tiff at [2] if tiled with gdal_translate takes
about 10 (ten) times longer to render in QGIS than it's stripped version.
2. There are software which don't support tiled TIFF at all. To stay
on the safe side I prefer to create stripped TIFFs in case I might be
sharing/selling them. I might be not the only one.
3. User will be surprised that gdalwarp -co "TILED=NO" -co
"COMPRESS=LZW" (or other compression alg.) creates tiffs bigger than
"COMPRESS=NONE".
4. Mind that gdal_translate -co "TILED=YES" still outperforms
gdalwarp -co "TILED=YES", any compression, file size - wise. With the
sample [2] it creates a TIFF over 8% smaller. Not *very* much, but with
13 such tiffs gdal_translate gives you a room on your hard disk for
another one, compared to gdalwarp.
[1]http://arcpadteam.blogspot.com/2006/08/raster-tips-1-choosing-raster-format.html
[2]http://www.biol.uni.wroc.pl/sieczka/udostepnione/M-33-21-A-b-4.tif
More information about the gdal-dev
mailing list