Opened 13 years ago

Closed 13 years ago

#2407 closed defect (fixed)

creating a Big GeoTIFF fails if compression is requested

Reported by: Ari Jolma Owned by: warmerdam
Priority: normal Milestone:
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords:


Using FWTools for Windows 2.1.0

gdal_translate x.ecw x.tiff

where x.ecw is a large file (60 000 x 100 000), works but

gdal_translate -co COMPRESS=LZW x.ecw x.tiff

fails with TIFFAppendToSTrip:Maximum TIFF file size exceeded

looks like this has been discussed a bit:

Change History (2)

comment:1 Changed 13 years ago by Even Rouault

The problem here is that you didn't ask explicitely GDAL to create a bigtiff.

When using no compression, GDAL can in advance compute the size of the resulting TIFF. If it's over 4 GB, it automatically switches to BigTIFF creation. But in the case of compressed format, GDAL cannot know in advance if BigTIFF is required or not. If your source file is only a black file, it will be very small once compressed...

So the solution is to explicitely ask for BigTIFF creation :

gdal_translate -co COMPRESS=LZW -co BIGTIFF=YES x.ecw x.tiff

I'll add a note in to state it more carefully.

comment:2 Changed 13 years ago by Even Rouault

Resolution: fixed
Status: newclosed

Section added in the documentation in r14625

Note: See TracTickets for help on using tickets.