I am trying to find the sum of all pixels in a raster, as shown below:

My raster enter image description here

How do I do this using QGIS?

  • We're a little different from other sites; this isn't a discussion forum but a Q&A site. Your questions should as much as possible describe not just what you want to do, but precisely what you have tried and where you are stuck trying that. Please check out our short tour for more about how the site works. – PolyGeo Dec 30 '20 at 21:16

"Raster layer statistics" in the processing toolbox:

  1. Select layer
  2. Select band
  3. See results

enter image description here

You can also save resulting stats into HTML file


I do recommend you use R and RStudio to do this. You can install the package raster and do that in a really easy way. Just read the documentation about that.

  • 3
    The OP specified that QGIS was the targeted platform. If someone asks about R, then providing a solution using R would be appropriate, but giving an RTFM for a different platform isn't appropriate. – Vince Dec 31 '20 at 1:48

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.