[gdal-dev] Problems generating a COG file

Javier Jimenez Shaw j1 at jimenezshaw.com
Wed Aug 20 14:36:11 PDT 2025


Right. it fails

$ gdal_translate web_mercator.tif web_mercator_jpeg.tif -co COMPRESS=JPEG
-co BIGTIFF=YES -of GTIFF -co TILED=YES -co BLOCKXSIZE=512 -co
BLOCKYSIZE=512 -oo NUM_THREADS=ALL_CPUS
Input file size is 677881, 303664
0..                                                  - estimated remaining
time: 00:31:20ERROR 1: LZWDecode:Not enough data at scanline 0 (short 2
bytes)

But if I change -oo with -co, it fails somewhere else:

$ gdal_translate web_mercator.tif web_mercator_jpeg_co.tif -co
COMPRESS=JPEG -co BIGTIFF=YES -of GTIFF -co TILED=YES -co BLOCKXSIZE=512
-co BLOCKYSIZE=512 -co NUM_THREADS=ALL_CPUS
Input file size is 677881, 303664
0...10...                                            - estimated remaining
time: 00:10:55ERROR 1: web_mercator.tif:Using code not yet in table
ERROR 1: TIFFReadEncodedTile() failed.
ERROR 1: web_mercator.tif, band 1: IReadBlock failed at X offset 2570, Y
offset 216: TIFFReadEncodedTile() failed.


On Wed, 20 Aug 2025 at 22:43, Even Rouault <even.rouault at spatialys.com>
wrote:

>
>
> Can I do other useful tests tonight?
>
> Maybe just check/confirm that the issue is multithreading on the decoding
> side (which it looks to be) with:
>
> gdal_translate web_mercator.tif web_mercator_jpeg.tif -co COMPRESS=JPEG
> -co BIGTIFF=YES -of GTIFF -co TILED=YES -co BLOCKXSIZE=512 -co
> BLOCKYSIZE=512 -oo NUM_THREADS=ALL_CPUS
>
> where web_mercator.tif is LZW or Deflate compressed
>
> -- http://www.spatialys.com
> My software is free, but my time generally not.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20250820/9f81db89/attachment.htm>


More information about the gdal-dev mailing list