I'm trying to come up with a way to patch over raster A with data from raster B. Extent of raster A can be smaller than raster B.
More specifically, I'd like to patch over nodata values from raster A with raster B values as well as create pixels in raster A where they exist in raster B.
Simple gdal_merge doesn't work for me as this doesn't work:
gdal_merge -o out.tif rasterA.tif rasterB.tif
as it is replacing values in raster A with values of raster B and would like values in raster A to be kept where they are not nodata.
and this won't work
gdal_merge -o out.tif rasterB.tif rasterA.tif
as it will replace values in raster B with nodata from raster A.
gdal_calc won't work, as rasters have different dimesions.
I'm aware that this such conditional logic can be implemented in Arc, but I'm looking for a solution using GDAL. Any suggestions?