I have a raster dataset that is made up of 280 tiles, 51Gb total. I need to smooth/blur the data, retaining the same resolution. I would like to blur across tile boundaries, where possible, so that points on the edge of each raster contain information from the neighbouring raster(s). I would like the output to be in the same format or smaller tiles.

I there an easy way to do this? I see that it's possible to blur using a KernelFilteredSource in VRT, but it's not clear how that can be made to work across tile boundaries.

I guess the other option is to write a script to load each tile, plus the margins from the surrounding 8 tiles, blur the result, trim, and re-save. I'm just wondering if there's a more efficient way to do it before I try that.

  • 1
    I would have a try in this way: 1) Create a vrt from the tiles with gdalbuildvrt. Let's call the result as mosaic.vrt. 2) Make a new vrt as gdal_translate -of vrt mosaic.vrt filtered.vrt. 3) Edit filtered.vrt and turn it into KernelFilteredSource as in the answer that you pointed.
    – user30184
    May 9, 2019 at 7:36
  • @user30184 that works incredibly well. Thank you! Please post it as an answer, and I will accept it.
    – naught101
    May 11, 2019 at 5:31

1 Answer 1


You can write two .VRT files and use them chained:

  1. Create a .VRT that mosaics all your source files into one virtual layer with gdalbuiltvrt https://www.gdal.org/gdalbuildvrt.html

  2. Make a new vrt that is referencing this Mosaic as gdal_translate -of vrt mosaic.vrt filtered.vrt

  3. Edit filtered.vrt and turn it into KernelFilteredSource as in the answer How to convert GeoTIFF to grayscale and add gaussian blur? and as documented in https://www.gdal.org/gdal_vrttut.html


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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