We are trying to process a set of elevation rasters of increasing resolution. We have a 30m resolution file that covers a large area, and a 5m resolution file that looks something like this image.

higher resolution elevation file

There is an area of valid elevation, but the rest of the file contains 'null' elevation data. We need to blend this elevation with the lower resolution and avoid visible artifacts. If we had a regular rectangle elevation file, then I'm pretty sure that any number of tools would do the trick - QGIS, gdalwarp etc..., but I haven't found a recipe that will work completely in our case.

I would be perfectly happy if we could upsample the lower resolution elevation to fill in the null area of the 5m file, and blend between those areas. That would probably be the best outcome.

I have been trying gdalwarp which has given me fairly decent results, doing something like this:

gdalwarp -srcnodata -32767 -r cubic 30m.tif 5m.tif outputcubic.tif

That's not too bad, in the merged file it upsamples the null elevation areas of the 5m with data from the 30m. I might be able to live with this, but it would be even nicer if the line between the higher res elevation and the upsampled lower res elevation were blended. I see blending options for gdalwarp, but aren't these options for cutlines?

Any ideas about how to accomplish this with either gdalwarp - or with something else?


There is a rather simple procedure which could be performed in GRASS GIS, see the section "Filling of holes" in https://grasswiki.osgeo.org/wiki/Interpolation#Filling_of_holes .

The idea is to generate extra raster sample points from an auxiliary raster map using r.random, merge them into the target raster maps with r.patch and then fill the hole using interpolation with r.fillnulls.

  • Great! I read the article, and it looks promising. I just need to grab some time to try it. Thanks. – Liz Jun 22 '17 at 23:30

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.