1

I have been using the merge tool in QGIS frequently and it had been working fine until today when the results started producing a black box around the bounding box area for where the raster tiles do not exist.(see below)

The output should just merge the raster datasets together without the black areas.

Data used Raster Tiles

Results enter image description here

Merge tool settings enter image description here

5

The result the you get by merging is a new rectangular raster. You do not have source data to the top-left corner but in the final raster there must be something and now that area is filled with black pixels. What you can do it to tell the image viewer that it should make the black pixels transparent. That may happen automatically it you add parameter -a_nodata 0 into your gdal_merge command as documented in https://www.gdal.org/gdal_merge.html.

Alternatively if you prefer to see area that does not contain data as white instead of black you can use option -init 255 that you can also find from the same manual.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.