I am trying to calculate volume using GRASS plugin in Qgis using module r.volume however the attached error message keeps appearing. Any ideas?

enter image description here

enter image description here

enter image description here

enter image description here


1 Answer 1


One of GRASS's unique properties is that it allocates cache memory with the g_malloc() pointer prior to computing. Because of this memory allocation the function will run faster and it surely won't result in an "out of memory" error after half of the function has run.

For this property of GRASS, you only have three options:

  • Select a smaller region extent
  • Resample your data to a lesser resolution
  • Find a machine with more memory (you can experiment with virtual memory)
  • In fact the region is already very small, i have attached various screenshots for your reference. the one where you can see the world there is a little red rectangle. This is the location I am working with. It is very small. I have also attached a screenshot of the resolution for you.
    – anina
    Commented Sep 25, 2014 at 10:47
  • How much memory your machine has? You can try to use lesser resolution (eg. 0.2, 0.3) until it works. Also look up the resolution of your input raster in the properties window and make sure that the resolution in GRASS region settings is set to equal or lesser. Commented Sep 25, 2014 at 11:57
  • Also it's suspicious to me, that GRASS tries to use a far better resolution than your current raster. This results in a resampled raster, which has the same accuracy of data but with more rows and columns, which is unnecessary. You can also try to stack with your current resolution and set your GRASS resolution to 60 rows and 180 columns. Commented Sep 25, 2014 at 12:05

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.