[GIS] Creating a mosaic with gdalwarp – How to deal with no data and overlap

gdalwarpimagerynodataqgis

I want to create a mosaic of satellite imagery in .tiff format.
I want to create an actual mosaic, not a vrt, because afterwards I will cut the image in to tiles that make sense for my users. Gdal merge is not an option because of the size of my images (I have tried many times and get a memory error).

The problem I have is that the the result is a gap in the data while the original files overlap nicely (see images). When running I set my nodata value correctly ("0" in this case).

the two images displayed in QGIS with transparency set for "0"

result of running gdalwarp

The images are 16 bit, and the collection period spans 2 years so there are huge color differences.
I am running QGIS 2.6 and Gdaltools 1.2.29 on W7 64 bit with 8GB Ram

I run the following command: gdalwarp -dstnodata 0 -of GTiff A.TIF B.TIF TEST_warp

Best Answer

After searching around for similar situations, I fixed the issue by'

  1. Reordering the bands to RGBN (They were BGRN) with gdal translate
  2. Converting the images from Uint16 to Byte with gdal_translate
  3. Lastly, I warped them using gdalwarp using the -tr and -tap options.

The solution at step 3 I found at: Holes between imagery tiles projected using gdalwarp

Related Question