I'm using Grid (Moving average) to get mean values of Point attribute in a circle of 20 m radius.

What is determining the step distance / the output pixel size? I can't find it in the documentation. I would like to set I manually to for example 10 m. enter image description here

  • 1
    Very interesting subject. Me neither could find any information. Looking at one old link I came across, I feel GDAL creates a blank base grid of 256 x 256 (Line 1132-1136) unless specified by the user. If it is the case the step distance could be 1/256 * xrange or yrange... NB. I am not a programmer. – Kazuhito Feb 6 at 12:15
  • 1
    You can try with the optional parameters -outsize (in pixel/line count) and/or -txe -txy – JGH Feb 6 at 12:21
  • @JGH that is the answer. If you want to post it please do or I will. – BERA Feb 7 at 12:43
  • 1
    @BERA please go ahead, you have the proper numerical values to put in the answer. Great that it is working! – JGH Feb 7 at 13:22

I dont know what is determining step distance if used in QGIS GUI but as commented it is possible to set it using the optional parameters -outsize, -txe and txy.

For example to get 10 m pixels I use command below in terminal:

gdal_grid -zfield datafield -a average:radius1=20:radius2=20:angle=0.0:min_points=0:nodata=0.0 -txe 626400 629800 -tye 6680000 6682000 -outsize 340 200 -ot Float32 -of GTiff D:/folder/someinputpointshapefile.shp D:/folder/OUTPUT.tif

(To calculate outsize:



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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