[Gdal-dev] gdaladdo throwing errors
Seth Price
seth at pricepages.org
Sat Mar 24 23:37:44 EDT 2007
I'm having a problem with gdaladdo, I'm afraid we don't seem to be
getting along. It's very sensitive about the levels specified. For
example, if I specify "2 4 6 12 24 48 96" for a 21600x21600px image
it works, but if I specify "2 4 8 16 32" it throws many errors.
I can normally find a set of levels that works via guessing, but that
isn't going to work any longer. Does anyone have any idea how I can
work around these errors? I haven't been able to find a pattern.
Fixing the problem would be better.
You can download the file that I've been using for a test here:
http://pricepages.org/temp/N048W123_x1_GLC.tif.gz (19MB)
I think you can ignore the "StripByteCounts" warnings. I'm fairly
sure that they are related to this bug. (It would be nice if someone
could have a look at that also, but it's not urgent.):
http://bugzilla.remotesensing.org/show_bug.cgi?id=1483
Here are some examples of the behavior that I'm talking about:
$ /usr/local/bin/gdal_translate test.tif test.2.tif
Warning 1: TIFFReadDirectory:test.tif: Wrong "StripByteCounts" field,
ignoring and calculating from imagelength
Input file size is 21600, 21600
0...10...20...30...40...50...60...70...80...90...100 - done.
Warning 1: TIFFReadDirectory:test.tif: Wrong "StripByteCounts" field,
ignoring and calculating from imagelength
$ /usr/local/bin/gdaladdo -r nearest test.2.tif 2 4 8 16 32
0.Warning 1: TIFFReadDirectory:test.2.tif: Wrong "StripByteCounts"
field, ignoring and calculating from imagelength
Warning 1: TIFFReadDirectory:test.2.tif: Wrong "StripByteCounts"
field, ignoring and calculating from imagelength
ERROR 1: test.2.tif:DumpModeDecode: Not enough data for scanline 0
ERROR 1: TIFFReadEncodedTile() failed.
ERROR 1: IReadBlock failed at X offset 0, Y offset 2
ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 2
ERROR 1: test.2.tif:DumpModeDecode: Not enough data for scanline 0
ERROR 1: TIFFReadEncodedTile() failed.
ERROR 1: IReadBlock failed at X offset 0, Y offset 2
ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 2
ERROR 1: test.2.tif:DumpModeDecode: Not enough data for scanline 0
ERROR 1: TIFFReadEncodedTile() failed.
[....]
$ ./gdaladdo -r nearest test.tif 2 4 6 12 24 48 96
Warning 1: TIFFReadDirectory:test.tif: Wrong "StripByteCounts" field,
ignoring and calculating from imagelength
0...10...20...30...40...50...60...70...80...90...100 - done.
Any ideas on where to proceed next with this?
Thanks for any help,
Seth
PS.
Again, fresh image with --debug on:
$ /usr/local/bin/gdaladdo --debug on -r nearest test.tif 2 4 8 16 32
GTiff: Opened 10800x10800 overview.
GTiff: Opened 5400x5400 overview.
GTiff: Opened 3600x3600 overview.
GTiff: Opened 1800x1800 overview.
GTiff: Opened 900x900 overview.
GTiff: Opened 450x450 overview.
GTiff: Opened 225x225 overview.
GDAL: GDALOpen(test.tif) succeeds as GTiff.
0Warning 1: TIFFReadDirectory:test.tif: Wrong "StripByteCounts"
field, ignoring and calculating from imagelength
GDAL: Potential thrashing on band 1 of test.tif.
Warning 1: TIFFReadDirectory:test.tif: Wrong "StripByteCounts" field,
ignoring and calculating from imagelength
ERROR 1: test.tif:DumpModeDecode: Not enough data for scanline 0
ERROR 1: TIFFReadEncodedTile() failed.
ERROR 1: IReadBlock failed at X offset 0, Y offset 0
ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 0
ERROR 1: test.tif:DumpModeDecode: Not enough data for scanline 0
ERROR 1: TIFFReadEncodedTile() failed.
ERROR 1: IReadBlock failed at X offset 0, Y offset 0
ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 0
Warning 1: TIFFReadDirectory:test.tif: Wrong "StripByteCounts" field,
ignoring and calculating from imagelength
ERROR 1: test.tif:DumpModeDecode: Not enough data for scanline 0
ERROR 1: TIFFReadEncodedTile() failed.
ERROR 1: IReadBlock failed at X offset 0, Y offset 0
ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 0
ERROR 1: test.tif:DumpModeDecode: Not enough data for scanline 0
ERROR 1: TIFFReadEncodedTile() failed.
ERROR 1: IReadBlock failed at X offset 0, Y offset 0
ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 0
Warning 1: TIFFReadDirectory:test.tif: Wrong "StripByteCounts" field,
ignoring and calculating from imagelength
ERROR 1: test.tif:DumpModeDecode: Not enough data for scanline 0
ERROR 1: TIFFReadEncodedTile() failed.
[...]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20070324/699a0714/attachment.html
More information about the Gdal-dev
mailing list