I am trying to interpolate rainfall data using the GDAL's Grid (Inverse Distance to a power) in QGIS 3.16.

Is there a way to specify the resolution of the result/change the size of pixel? The resulting raster file is always .05x.05 resolution and I want to make a .02x.02 resolution.

enter image description here

2 Answers 2


Sorry to disagree with the first answer, but using the base gdal_grid utility you can most certainly set the output resolution. You need to specify the parameter -tr ("target resolution"). See the gdal_grid man page.

You would run something like:

gdal_grid -tr 0.02 -a invdist:power=2 -zfield January_di <input_data> <output_interp.tif>

At least according to the documentation (https://docs.qgis.org/2.8/en/docs/user_manual/processing_algs/gdalogr/gdal_analysis/gridinvdist.html) there is no way to control the output raster size. EDIT: As Micha stated out in his answer, this is possible if you run the GDAL algorithm from command prompt and use -tr flag. Sorry for mislead! :)

However, you can resample your .05 x .05 output file e.g. with GRASS's resampling algorithm (https://grass.osgeo.org/grass79/manuals/r.resamp.interp.html) to the resolution of your desire.

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.