I have two different DEM grids (basically single-band GeoTIFFs) and I want to merge them.
The grids overlap and have different values, and I want to create a new DEM grid that takes the average or maybe maximum value in the overlapping regions. The DEM grids already have a nodata flag in them.
Currently I have this script through OsGeo4W:
set pathin=F:\mergebox_DEM\IN set pathout=F:\mergebox_DEM\OUT set filename=Merge_result gdalbuildvrt -tr 0.3 0.3 -r bilinear index.vrt %pathin%\*.tif gdal_translate index.vrt %pathout%\%filename%.tif -tr 0.3 0.3 -co COMPRESS=PACKBITS -co BIGTIFF=YES
This is not very good - you can clearly see that the files are simply overlapped. I think I see why that happens - the bilinear resampling is applied after the two files are overlapped?
Am I missing something very basic?
I don't want to use a raster calculator, because in the future I might have to merge a large number of files and I would like to be able to do it directory-wise.