Thursday, 11 May 2017

qgis - Which value does raster merge chose in overlapping area?


When using the 'Merge' tool in QGIS, which raster value does it choose when there are overlaps between the raster?



Answer



If you're using the standard gdal_merge, later rasters overwrite earlier rasters (as in, the order they appear in the command line).


From the usage document (emphasis mine)




This utility will automatically mosaic a set of images. All the images must be in the same coordinate system and have a matching number of bands, but they may be overlapping, and at different resolutions. In areas of overlap, the last image will be copied over earlier ones.



If you want a particular raster to take precedence, you need to edit the command line and change the order yourself (you can use the pencil icon to do this).


If you want more control, e.g. blending/interpolating overlaps automatically (feathering) or taking the maximum pixel value from multiple rasters at a particular overlapping cell, you can use SAGA GIS - see this answer


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...