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

Craig Miller craig.miller at spatialminds.com
Fri Mar 14 18:24:06 EDT 2008


I'm interested now, as it sounds like the GDAL API calls that gdalwarp uses
are dictating how good the compression is which in turn is affecting how
good the compression is of an in-house utility we are using.  I don't have
time to look at it for a couple of weeks, but if nobody has looked into it
by then I will.

In the meantime, you have a good workaround.  Use gdalwarp followed by a
gdal_translate to get the compression.  A bit of a PITA, but it doesn't
sound like it is a showstopper.

Craig
 
---
http://www.overlandnavigator.com
Touchscreen Friendly GPS Mapping 

-----Original Message-----
From: gdal-dev-bounces at lists.osgeo.org
[mailto:gdal-dev-bounces at lists.osgeo.org] On Behalf Of Maciej Sieczka
Sent: Friday, March 14, 2008 2:50 PM
To: Frank Warmerdam
Cc: gdal-dev at lists.osgeo.org; GRASS developers list
Subject: [gdal-dev] Re: gdalwarp -co COMPRESS issues

Frank Warmerdam pisze:
> Maciej Sieczka wrote:

>> It is very important for all gdalwarp users. 

> I disagree with the above statement.  I think it is a small
> segment of people who create compressed files with gdalwarp, and
> there is a fairly straightforward workaround (warp then compress).

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.

Moreover, I wonder if the guts of the issue that gdalwarp handles 
compression wrong, might also affect GDAL-dependent software. Eg. 
r.out.gdal in GRASS - I took the sample [1], imported into GRASS and 
re-exported with:

r.in.gdal in=M-33-21-A-b-4.tif out=M-33-21-A-b-4 -o
g.region rast=M-33-21-A-b-4.red -a
r.out.gdal in=M-33-21-A-b-4 out=M-33-21-A-b-4_gr_lzw.tif 
-createopt="COMPRESS=LZW" type=Byte

which created an LZW-compressed TIFF 2.33 times bigger than the 
original, also LZW-compressed. Could this r.out.gdal issue be related to 
gdalwarp issue?

Maciek

_______________________________________________
gdal-dev mailing list
gdal-dev at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

No virus found in this incoming message.
Checked by AVG. 
Version: 7.5.519 / Virus Database: 269.21.7/1329 - Release Date: 3/14/2008
12:33 PM
 

No virus found in this outgoing message.
Checked by AVG. 
Version: 7.5.519 / Virus Database: 269.21.7/1329 - Release Date: 3/14/2008
12:33 PM
 



More information about the gdal-dev mailing list