[gdal-dev] create mosaic using mask bands
Gregory, Matthew
matt.gregory at oregonstate.edu
Fri Apr 13 15:43:22 EDT 2012
Hi Etienne,
Etienne Tourigny wrote:
> You should use gdalwarp only, no ned for gdal_merge.py.
Thanks for that. So noted.
> The order of input datasets is important, so in your case you should use
> gdalwarp south.tif north.tif merge.tif
>
> Plus you don't need a mask, the last input file will override the first
> one.
Although I actually want south.tif to be on top, so I think I need to specify that last, correct? But I do want the mask incorporated into south.tif to represent the areas of NODATA for the south.tif raster, so in those pixels, north.tif pixels should be in the output image.
My use case is dealing with Landsat TM scenes that have '0' as background values as a 'collar' to the scene, but 0 is also a valid value within the scene. The -srcnodata argument to gdalwarp therefore doesn't work. I have external tif files representing the valid pixels of the scene that I intend to copy into the mask band of a dataset.
Sorry if I was unclear.
matt
More information about the gdal-dev
mailing list