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 ...
Get QGIS Python Programming Cookbook - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.