3

In QGIS (Version 3.22), if I need to change (reduce) the resolution of a raster layer, I can simply choose "Save as.." from the "Layer" menu or I can use the "Align Raster" tool from the "Raster" menu. I would have expected that it's possible to choose the resampling method when doing it via "Save as...". But I don't find the respective option in the dialogue. To choose a resampling method, I need to use the "Align Raster" tool.

How does QGIS resample the raster when I use the "Save as..." option?

1 Answer 1

5

If you are looking to change the resolution of a raster layer, your best option is probably the Warp tool (gdalwarp). You can choose from a full range of resampling methods, and set the output file resolution.

enter image description here

While the Align Raster tool can be used to achieve the same result, its primary purpose (as its name suggests) is to align multiple rasters based on a reference layer.

The Warp tool is part of the Processing Toolbox so can be easily integrated in to a Model, or invoked via PyQGIS (or run via the command line, as gdalwarp). Generally speaking, it is more versatile.

Your second question

How does QGIS resample the raster when I use the "Save as..." option?

is already answered here: What resampling method is used in the raster 'Save as...' dialog?

3
  • Thank you! But could you edit your answer and say what is the advantage of "Warp" compared with "Align Raster", which also allows the selection of the resampling method and the output resolution? That would make things more clear for me (and for others, I think).
    – winnewoerp
    Commented May 6, 2023 at 9:48
  • 2
    @winnewoerp Both tools have different options but use the same underlying method, the GDAL Warp algorithm.
    – user2856
    Commented May 6, 2023 at 13:11
  • Thanks for the edit. And @user2856: That's very good to know, thanks as well.
    – winnewoerp
    Commented May 6, 2023 at 18:20

Your Answer

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

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