<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV>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 "<FONT class="Apple-style-span" face="Courier">2 4 8 16 32</FONT>" it throws many errors.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>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.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>You can download the file that I've been using for a test here:</DIV><DIV><A href="http://pricepages.org/temp/N048W123_x1_GLC.tif.gz">http://pricepages.org/temp/N048W123_x1_GLC.tif.gz</A> (19MB)</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I think you can ignore the "<FONT class="Apple-style-span" face="Courier">StripByteCounts</FONT>" 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.):</DIV><DIV><A href="http://bugzilla.remotesensing.org/show_bug.cgi?id=1483">http://bugzilla.remotesensing.org/show_bug.cgi?id=1483</A></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Here are some examples of the behavior that I'm talking about:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">$ /usr/local/bin/gdal_translate test.tif test.2.tif</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">Warning 1: TIFFReadDirectory:test.tif: Wrong "StripByteCounts" field, ignoring and calculating from imagelength</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">Input file size is 21600, 21600</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">0...10...20...30...40...50...60...70...80...90...100 - done.</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">Warning 1: TIFFReadDirectory:test.tif: Wrong "StripByteCounts" field, ignoring and calculating from imagelength</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier"><BR class="khtml-block-placeholder"></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">$ /usr/local/bin/gdaladdo -r nearest test.2.tif 2 4 8 16 32</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">0.Warning 1: TIFFReadDirectory:test.2.tif: Wrong "StripByteCounts" field, ignoring and calculating from imagelength</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">Warning 1: TIFFReadDirectory:test.2.tif: Wrong "StripByteCounts" field, ignoring and calculating from imagelength</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">ERROR 1: test.2.tif:DumpModeDecode: Not enough data for scanline 0</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">ERROR 1: TIFFReadEncodedTile() failed.</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier"><BR class="khtml-block-placeholder"></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">ERROR 1: IReadBlock failed at X offset 0, Y offset 2</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 2</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">ERROR 1: test.2.tif:DumpModeDecode: Not enough data for scanline 0</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">ERROR 1: TIFFReadEncodedTile() failed.</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier"><BR class="khtml-block-placeholder"></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">ERROR 1: IReadBlock failed at X offset 0, Y offset 2</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 2</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">ERROR 1: test.2.tif:DumpModeDecode: Not enough data for scanline 0</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">ERROR 1: TIFFReadEncodedTile() failed.</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">[....]</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">$ ./gdaladdo -r nearest test.tif 2 4 6 12 24 48 96</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">Warning 1: TIFFReadDirectory:test.tif: Wrong "StripByteCounts" field, ignoring and calculating from imagelength</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">0...10...20...30...40...50...60...70...80...90...100 - done.</FONT></FONT></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Any ideas on where to proceed next with this?</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Thanks for any help,</DIV><DIV>Seth</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>PS.</DIV><DIV>Again, fresh image with --debug on:</DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">$ /usr/local/bin/gdaladdo --debug on -r nearest test.tif 2 4 8 16 32</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">GTiff: Opened 10800x10800 overview.</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier"><BR class="khtml-block-placeholder"></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">GTiff: Opened 5400x5400 overview.</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier"><BR class="khtml-block-placeholder"></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">GTiff: Opened 3600x3600 overview.</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier"><BR class="khtml-block-placeholder"></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">GTiff: Opened 1800x1800 overview.</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier"><BR class="khtml-block-placeholder"></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">GTiff: Opened 900x900 overview.</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier"><BR class="khtml-block-placeholder"></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">GTiff: Opened 450x450 overview.</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier"><BR class="khtml-block-placeholder"></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">GTiff: Opened 225x225 overview.</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier"><BR class="khtml-block-placeholder"></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">GDAL: GDALOpen(test.tif) succeeds as GTiff.</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier"><BR class="khtml-block-placeholder"></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">0Warning 1: TIFFReadDirectory:test.tif: Wrong "StripByteCounts" field, ignoring and calculating from imagelength</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">GDAL: Potential thrashing on band 1 of test.tif.</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">Warning 1: TIFFReadDirectory:test.tif: Wrong "StripByteCounts" field, ignoring and calculating from imagelength</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">ERROR 1: test.tif:DumpModeDecode: Not enough data for scanline 0</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">ERROR 1: TIFFReadEncodedTile() failed.</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier"><BR class="khtml-block-placeholder"></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">ERROR 1: IReadBlock failed at X offset 0, Y offset 0</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 0</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">ERROR 1: test.tif:DumpModeDecode: Not enough data for scanline 0</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">ERROR 1: TIFFReadEncodedTile() failed.</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier"><BR class="khtml-block-placeholder"></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">ERROR 1: IReadBlock failed at X offset 0, Y offset 0</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 0</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">Warning 1: TIFFReadDirectory:test.tif: Wrong "StripByteCounts" field, ignoring and calculating from imagelength</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">ERROR 1: test.tif:DumpModeDecode: Not enough data for scanline 0</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">ERROR 1: TIFFReadEncodedTile() failed.</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier"><BR class="khtml-block-placeholder"></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">ERROR 1: IReadBlock failed at X offset 0, Y offset 0</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 0</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">ERROR 1: test.tif:DumpModeDecode: Not enough data for scanline 0</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">ERROR 1: TIFFReadEncodedTile() failed.</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier"><BR class="khtml-block-placeholder"></FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">ERROR 1: IReadBlock failed at X offset 0, Y offset 0</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 0</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">Warning 1: TIFFReadDirectory:test.tif: Wrong "StripByteCounts" field, ignoring and calculating from imagelength</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">ERROR 1: test.tif:DumpModeDecode: Not enough data for scanline 0</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">ERROR 1: TIFFReadEncodedTile() failed.</FONT></FONT></DIV><DIV><FONT class="Apple-style-span" color="#000000"><FONT class="Apple-style-span" face="Courier">[...]</FONT></FONT></DIV><DIV><BR class="khtml-block-placeholder"></DIV></BODY></HTML>