Opened 19 years ago

Closed 17 years ago

#972 closed defect (fixed)

gdal_merge pukes with -co "compress=lzw"

Reported by: matt.wilkie@… Owned by: warmerdam
Priority: normal Milestone:
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords:

Description (last modified by hobu)

It appears doesn't like the compress option but the error message
doesn't say so. I've only tred with lzw compression.


On windows within 10 or 15 seconds of running 'gdal_merge -o out.tif -co
"compress=lzw" %indems%" the standard MS dialog pops up saying so-n-so has
crashed and would you like to send a bug report to MS-HQ. If you shorten the
input list to 2 files, it works. (each input file is a 9mb CDED dem.)

On linux the error is more like "/usr/local/fwtools/bin_safe/ line
9:  3865 Segmentation fault $FWTOOLS_HOME/bin/`basename $TARGET` $@"

both windows and linux are using recent versions of fwtools. There is 1gb ram on
the win machine and 768 on the linux one.

Change History (4)

comment:1 by matt.wilkie@…, 19 years ago

I forgot to say that if the compress option is removed it works. :)
and just for the heck of it I tried packbits and so far that seems to be okay
(been running for about 10 minutes now).

comment:2 by matt.wilkie@…, 19 years ago

After about 20 min the packbits test crashed with:

ERROR 1: crashtest2.tif:PackBitsDecode: Not enough data for scanline 302
ERROR 1: TIFFReadEncodedStrip() failed.

ERROR 1: IReadBlock failed at X offset 0, Y offset 302
ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 302
Traceback (most recent call last):
  File "c:\local\fwtools\bin\", line 478, in ?
    fi.copy_into( t_fh, band, band, nodata )
  File "c:\local\fwtools\bin\", line 288, in copy_into
    nodata_arg )
  File "c:\local\fwtools\bin\", line 123, in raster_copy
    data, t_xsize, t_ysize, t_band.DataType )
  File "c:\local\fwtools\pymod\", line 863, in WriteRaster
    buf_string, buf_xsize, buf_ysize,buf_type)
TypeError: GetBlockRef failed at X block offset 0, Y block offset 302

input file list was 152 files, occupying 1.5gb. the output.tif, as much of it as
got created, is 4.1gb. Free disk space: 2.3gb.

Using the same input list on a linux machine, but not using any compression,
completed successfully and created an output file of 556mb.

comment:6 by hobu, 17 years ago

Description: modified (diff)

Can we close this one as a duplicate of #1470?

comment:7 by warmerdam, 17 years ago

Priority: highnormal
Resolution: fixed
Status: newclosed


This should be working now. Please re-open if it doesn't work with the most recent FWTools.

Note: See TracTickets for help on using tickets.