Opened 9 years ago

Closed 9 years ago

#5964 closed defect (worksforme)

Empty tiled output when translating small files

Reported by: sgillies Owned by: warmerdam
Priority: normal Milestone:
Component: default Version: 1.11.2
Severity: normal Keywords: tiles
Cc:

Description

Running gdal_translate on the small 38x41 TIFF (attached) results in an empty output file when the block size is greater than the input.

gdal_translate tiny.tif /tmp/tiny.48.tif -co TILED=YES -co BLOCKXSIZE=48 -co BLOCKYSIZE=48

As I can reproduce this using Rasterio, it seems to be not a gdal_translate bug but a GDAL raster I/O bug.

>>> import rasterio
>>> with rasterio.open('tiny.tif') as src:
...     kwds = src.meta
...     kwds.update(tiled=True, blockxsize=48, blockysize=48)
...     with rasterio.open('/tmp/tiny.48rio.tif', 'w', **kwds) as dst:
...         dst.write(src.read())

Attachments (2)

tiny.tif (5.3 KB ) - added by sgillies 9 years ago.
Untitled.png (57.3 KB ) - added by sgillies 9 years ago.

Download all attachments as: .zip

Change History (5)

by sgillies, 9 years ago

Attachment: tiny.tif added

comment:1 by sgillies, 9 years ago

Keywords: tiles added
Version: unspecified1.11.2

Using gdal_translate with 16x16 output blocks give me the results I expect.

by sgillies, 9 years ago

Attachment: Untitled.png added

comment:2 by Even Rouault, 9 years ago

Sean, I cannot reproduce neither with 1.11 branch nor trunk. I suspect this is a deficiency of the viewer you're using. Works for me with display (from ImageGraphics package) or QGIS

Last edited 9 years ago by Even Rouault (previous) (diff)

comment:3 by Even Rouault, 9 years ago

Resolution: worksforme
Status: newclosed

Closing under the assumption it is a defect of the viewer. Please reopen otherwise

Note: See TracTickets for help on using tickets.