Opened 16 years ago

Closed 16 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:
Cc:

Description

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: http://www.nabble.com/gdal_merge-and-BIGTIFF-option-fails-td15635770.html

Change History (2)

comment:1 by Even Rouault, 16 years ago

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 http://www.gdal.org/frmt_gtiff.html to state it more carefully.

comment:2 by Even Rouault, 16 years ago

Resolution: fixed
Status: newclosed

Section added in the documentation in r14625

Note: See TracTickets for help on using tickets.