Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#6537 closed defect (fixed)

gdal creates strips of missing pixels

Reported by: nowakr Owned by: warmerdam
Priority: normal Milestone:
Component: default Version: unspecified
Severity: normal Keywords:
Cc:

Description

After building a vrt mosaic with gdalbuildvrt and exporting a rectangular piece of image with gdal_translate at a different resolution to the native resolution of the component images gdal inserts a strip of missing pixels (appearing as nodata or a zero pixel value) in the final image. I am using gdal 1.11.4.

To demonstrate this clearly I have attached 4 sample tiffs (1-band all pixels = 255). To recreate the fault do

gdalbuildvrt -tr 0.75 0.75 -tap f1234.vrt f1.tif f2.tif f3.tif f4.tif
gdal_translate f1234.vrt f1234.tif -projwin 1666730 6057943 1667698 6057175 -co COMPRESS=DEFLATE

The resulting image has a black strip at approx. 6057558m north. N.B. This does not coincide with the location where the component images join - it is not a gap between the images that causes this.

I am not aware of any command line switch that can eliminate this behaviour and assume it is a bug in the way gdal samples the images, since all pixel values are 255 and it is not possible to sample zero.

Attachments (7)

f1.tif (179.2 KB ) - added by nowakr 8 years ago.
f2.tif (179.2 KB ) - added by nowakr 8 years ago.
f3.tif (179.2 KB ) - added by nowakr 8 years ago.
f4.tif (179.2 KB ) - added by nowakr 8 years ago.
f1234.tif (19.4 KB ) - added by nowakr 8 years ago.
f1234_screenshot.png (60.8 KB ) - added by nowakr 8 years ago.
f1234.vrt (5.5 KB ) - added by nowakr 8 years ago.

Download all attachments as: .zip

Change History (9)

by nowakr, 8 years ago

Attachment: f1.tif added

by nowakr, 8 years ago

Attachment: f2.tif added

by nowakr, 8 years ago

Attachment: f3.tif added

by nowakr, 8 years ago

Attachment: f4.tif added

by nowakr, 8 years ago

Attachment: f1234.tif added

by nowakr, 8 years ago

Attachment: f1234_screenshot.png added

by nowakr, 8 years ago

Attachment: f1234.vrt added

comment:1 by Even Rouault, 8 years ago

Resolution: fixed
Status: newclosed

The problem no longer appears with GDAL 2.1. This is a rounding issue in the VRT driver. I'm not keen in backporting this as it is not trivial to do so and it might cause slight changes in expected results of the autotest suite

comment:2 by nowakr, 8 years ago

I have just checked it and there is no strip created in 2.1.0. Thank you for the quick response.

Note: See TracTickets for help on using tickets.