Using QGIS 3.8.2, I rasterize a Geopackage vector point layer using the Raster > Conversion > Rasterize tool, with output to a .tif file.

However, where multiple input points are within a single output cell, the tool will only output the value of one point. I need the average of all points within each cell.

Rasterizing point layer with multiple features falling inside raster cell using GDAL? describes how to sum multiple input points into one output raster cell. In this case, the solution was to incorporate the option MERGE_ALG=ADD. However, a review of the current gdal_rasterize documentation makes no mention of MERGE_ALG. Furthermore, that was done within the context of Python, which I know nothing about.

1 Answer 1


The gdal_rasterize option for adding values from all points within each cell is -add. There is no option to do other types of stats - such as average. You can use SAGA Rasterize algorithm from QGIS, which gives you options such as minimum/ maximum/ mean/ first last to deal with multiple values.

  • Perfect, thanks! I suppose that the MERGE_ALD option used in the previous post has been deprecated.
    – Stu Smith
    Commented Aug 28, 2019 at 16:49
  • Sadly, the SAGA Rasterize tool does not have an "add" option... or a "count" option, which would be handy to calculate point frequency in each cell.
    – Stu Smith
    Commented Aug 29, 2019 at 4:27

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.