I'm trying to downsample a raster then upsample it again.

I am using the gdalwarp function in QGIS.

When downsampling the raster looks OK in the front end, I set the cell size to 10x the original raster.

When upsampling back to the original cell size using the downsampled raster the original data seems to be preserved and I end up back at the original raster. What I'm expecting to happen is that I see blocks of 10x10 cells all with the same value (same as the downsampled raster).

Does QGIS preserve the original cell values?

Is there a way to perform this operation?

  • 1
    If you save the downsampled result into a new file with a new name and upsample that it would be a miracle if QGIS can find new details to the image.
    – user30184
    May 8, 2015 at 9:19
  • Why use gdalwarp? Use for example the SAGA/Grid-Tools: resampling. This works fine.
    – RolandG
    May 8, 2015 at 10:28
  • Why not? gdalwarp should work just as fine, or gdal_translate with -tr parameter.
    – user30184
    May 8, 2015 at 11:24
  • If you use the nearest neighbour resampling method this should indeed work - and on my machine it does. Did you make sure to not accidentaly select the original raster as input in the dropdown menu when upscaling? Could you provide a small sample dataset so we can reproduce this error?
    – Kersten
    May 8, 2015 at 12:40
  • Sounds like you're looking for the QGIS equivalent of ArcGIS' Block Statistics.
    – Chris W
    May 9, 2015 at 0:11

1 Answer 1


I'm hoping this fits your problem, I've found that r.resamp.stats functions the same as ArcGIS's block statistics

I just used it to calculate the mode of 5x5 cell blocks

Have a play around with that

Block statistics is really handy for determining things such as mean and mode

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.