[gdal-dev] gdalwarp/gdalmerge overlapping single band gtiffs

Gareth Grewcock garethgrewcock at gmail.com
Fri Jul 24 02:35:50 PDT 2015

Hi - I'm having difficulties with warping or merging overlapping single
band gtiffs (where the input tifs bounding box overlap)

When using gdalwarp:

I achieve the desired output extent of both tifs however, the data range of
the output tif is 0 to 0 (min and max values are both 0).

It appears to recognise the nodata value as the extent of both tifs are in
the gdalwarp output, it's just the data range is incorrect.

When I use gdalmerge:

In the documentation it says ' In areas of overlap, the last image will be
copied over earlier ones.'

Is it possible to overwrite the nodata values in the earlier image with real
data values present in the last image?

Because of this, the output gtiff extent from gdalmerge honours the first
gtiff bounding box and masks any real data from other tifs used within the

Apologies, pretty difficult to explain but created a quick visual to show
the outputs here |

Also example data is here which should hopefully replicate the issue |


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20150724/7db4fb58/attachment-0001.html>

More information about the gdal-dev mailing list