[gdal-dev] PackBitsDecode: Not enough data ...

Hermann Peifer peifer at gmx.eu
Wed Jul 1 04:50:51 EDT 2009


Even Rouault wrote:
> Does gdalinfo -checksum lceugr100_00_pct_epsg4326.tif works ?
>   
Not really:
Warning 1: lceugr100_00_pct_epsg4326.tif:PackBitsDecode: discarding 94 
bytes to avoid buffer overrun
ERROR 1: lceugr100_00_pct_epsg4326.tif:PackBitsDecode: Not enough data 
for scanline 13228
ERROR 1: TIFFReadEncodedStrip() failed.

ERROR 1: IReadBlock failed at X offset 0, Y offset 13228
ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 13228
ERROR 3: Checksum value couldn't be computed due to I/O read error.

> If it doesn't, you might want to try with a recent GDAL (e.g 1.6.1)and internal libtiff support.
>   
OK. I upgraded from version 1.6.0 to 1.6.1. This didn't help. I ran into 
the same error at the same scanline 22054. :-(

I am also not too sure about internal libtiff support, as configure 
tells me:
LIBTIFF support:           external (BigTIFF=no)

Some postings on Internet suggest as a workaround: first warping without 
compression, then compressing afterwards via gdal_translate. This worked 
fine for smaller raster data sets, but eventually, I ran into the error 
that the uncompressed (intermediate) destination file would be larger 
than the limit (4GB).

I am basically stuck now.

:-( Hermann

> Le Tuesday 30 June 2009 16:06:52 Hermann Peifer, vous avez écrit :
>   
>> Hi.
>>
>> I am trying to warp a GeoTiff from EPSG:3035 to EPSG:4326. After 50%
>> done, I end up with the following errors:
>>
>> $ gdalwarp -t_srs EPSG:4326 lceugr100_00_pct.tif lceugr100_00_pct_epsg4326.tif -co COMPRESS=PACKBITS
>>
>> Copying color table from lceugr100_00_pct.tif to new file.
>> Creating output file that is 121261P x 44229L.
>> Processing input file lceugr100_00_pct.tif.
>>
>> 0...10...20...30...40...50..ERROR 1:
>> lceugr100_00_pct_epsg4326.tif:PackBitsDecode: Not enough data for
>> scanline 22054
>>
>> ERROR 1: TIFFReadEncodedStrip() failed.
>> ERROR 1: IReadBlock failed at X offset 0, Y offset 22054
>> ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 22054
>>
>> Is there any issue with the decoding the PACKBITS compression?
>>
>> Hermann
>>
>>
>>
>> $ gdalinfo lceugr100_00_pct.tif
>>
>> Driver: GTiff/GeoTIFF
>> Files: lceugr100_00_pct.tif
>>         lceugr100_00_pct.aux
>> Size is 67000, 58000
>> Coordinate System is:
>> PROJCS["ETRS_1989_LAEA_L52_M10",
>>      GEOGCS["GCS_ETRS_1989",
>>          DATUM["European_Terrestrial_Reference_System_1989",
>>              SPHEROID["GRS_1980",6378137.0,298.257222101]],
>>          PRIMEM["Greenwich",0.0],
>>          UNIT["Degree",0.0174532925199433]],
>>      PROJECTION["Lambert_Azimuthal_Equal_Area"],
>>      PARAMETER["False_Easting",4321000.0],
>>      PARAMETER["False_Northing",3210000.0],
>>      PARAMETER["Central_Meridian",10.0],
>>      PARAMETER["Latitude_Of_Origin",52.0],
>>      UNIT["Meter",1.0]]
>> Origin = (800000.000000000000000,6500000.000000000000000)
>> Pixel Size = (100.000000000000000,-100.000000000000000)
>> Metadata:
>>    AREA_OR_POINT=Area
>> Image Structure Metadata:
>>    COMPRESSION=PACKBITS
>>    INTERLEAVE=BAND
>> Corner Coordinates:
>> Upper Left  (  800000.000, 6500000.000) ( 72d48'20.05"W, 59d 5'6.85"N)
>> Lower Left  (  800000.000,  700000.000) ( 24d 7'20.21"W, 22d12'54.64"N)
>> Upper Right ( 7500000.000, 6500000.000) ( 90d22'56.28"E, 61d55'58.94"N)
>> Lower Right ( 7500000.000,  700000.000) ( 41d 0'50.13"E, 23d29'5.23"N)
>> Center      ( 4150000.000, 3600000.000) (  7d17'47.28"E, 55d28'33.08"N)
>> Band 1 Block=67000x1 Type=Byte, ColorInterp=Palette
>>    Metadata:
>>      LAYER_TYPE=thematic
>>    Color Table (RGB with 256 entries)
>> ...
>>
>> _______________________________________________
>> gdal-dev mailing list
>> gdal-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>     
>
>   


More information about the gdal-dev mailing list