I am using Grid (Nearest Neighbour) in QGIS to obtain raster layer from point shapefile.

However, on execution of the tool and obtaining the output, the default resolution of cell is 62 m. However, I want to change the resolution to 1 m x 1 m. How do I do that. ? I am unable to find any option for that.

  • Good answer, I would accept this answer
    – itsgupta
    Apr 19, 2021 at 0:15

1 Answer 1


I'm not sure why the QGIS processing algorithm doesn't allow you to specify output pixel size easily in the GUI, but you can pass a pixel size to the underlying gdal_grid call (requires gdal >= 3.2) by adding -tr xres yres i.e. -tr 1 1 to the "Additional command-line parameters [optional]" box:

enter image description here

For gdal < 3.2 you could calculate how many rows (ymax - ymin) and columns (xmax - xmin) required and adding -outsize columns rows to the "Additional command-line parameters [optional]" box:

enter image description here

  • Does resolution of raster needs to be necessarily more than the search radius? Apr 19, 2021 at 7:59
  • That's another question
    – user2856
    Apr 19, 2021 at 8:56
  • Unknown option name '-tr' Apr 19, 2021 at 9:13
  • 1
    requires gdal >= 3.2
    – user2856
    Apr 19, 2021 at 11:47
  • With -tr 1970 1970 I get an error saying ERROR 5: Invalid txe or tye parameters detected. Please check your -txe or -tye argument.
    – Fee
    Oct 27, 2021 at 12:12

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.