Resampling raster resolution
Resampling an image allows you to change the current resolution of an image to a different resolution. Resampling to a lower resolution, also known as downsampling, requires you to remove pixels from the image while maintaining the geospatial referencing integrity of the dataset. In the QGIS Processing Toolbox, the gdalogr:warpproject
algorithm is used, which is the same as the algorithm used for reprojection.
Getting ready
We will again use the SatImage raster available at https://github.com/GeospatialPython/Learn/raw/master/SatImage.zip.
Place this raster in your /qgis_data/rasters
directory.
How to do it...
There's an extra step in this process where we will get the current pixel resolution of the raster as a reference to calculate the new resolution and pass it to the algorithm. To do this, we need to perform the following steps:
Start QGIS.
From the Plugins menu, select Python Console.
Import the
processing
module:import processing
Load and validate the...