I'm trying to conduct raster analysis in QGIS on a digital elevation model with a grid resolution of 5 cm. The disk size for the data set is 151 MB. When using default GDAL raster calculator it throws an error " Raster Calculator: Insufficient memory available for operation."

Can anyone suggest alternatives to QGIS raster calculator?

PS- I have tried using SAGA Grid calculator but on the import of the same dataset in SAGA, the software crashes.

The following are the hardware specifications of my desktop:

AMD FX6300 six core 3.5GHz

Installed RAM 4.0 GB (3.5 GB usable)

64-bit operating system

Raster info:

Driver GDAL provider GTiff
Dataset Description
Band 1
X: 14249 Y: 26318 Bands: 1
Pixel Size
No Data Value
Data Type
Float32 - Thirty two bit floating point
Pyramid overviews
Layer Spatial Reference System
+proj=utm +zone=43 +datum=WGS84 +units=m +no_defs
Layer Extent (layer original source projection)
408713.6688200000207871,1691448.5592900000046939 : 409446.3524000000325032,1692801.8308500000275671
Band 1
Band No
No Stats
No stats collected yet


2 Answers 2


Try to divide raster into parts and then use raster calculator - your DEM is very high detailed and huge, I mean

  • The raster represents an area of only 100 acres but the GSD is 5 cm
    – Tab_surv
    Commented Jun 29, 2017 at 16:33
  • Hence tiling is not a feasible option.
    – Tab_surv
    Commented Jun 29, 2017 at 16:40
  • 1
    You mention in your question that the DEM raster is 141 MB. However I see in the gdaliinfo output that it's 14,000 x 26,000 pixels, and with data type float 32. If my calculation is correct, that should be about 3 GB ??
    – Micha
    Commented Jun 30, 2017 at 7:17

Your image is way too big to process with 4GB RAM. I used to process UAS rasters of similar size, but I was using a workstation with 64GB RAM. I'm pretty sure you'll need at least 8GB, maybe 16GB RAM, to load a raster that size in-memory.

As @micha said, the size is a lot larger than you think, the image will take 1.5GB (using a 32 bit OS) up to a worst-case of 3Gb (with 64 bit OS). As an absolute minimum, 14249 x 26318 x 4 x 1 = 1,500,020,728 bytes (1.5 GB)

Your best bet is to split the raster into tiles as @Jane suggested. This question has some answers which might help.

You could also try r.mapcalc which should be available using the Processing toolbar. I've not tried this on a raster this size, but it's worth a try.

enter image description here

Provided your raster calculator function doesn't rely on neighbouring pixels' values, you can use Build Virtual Raster (Catalog) to re-combine the processed tiles afterwards.

  • Thanks, @Steven. Actually, the info above is for uncompressed raster which occupies 1.34GB disk space. I'm using a 32-bit QGIS version on a 4GB RAM system hence the issue. Tried, the same on a 16GB RAM i7 with NVIDIA GTX 780 and the same operation could be performed on default QGIS raster calculator.
    – Tab_surv
    Commented Jul 1, 2017 at 11:22

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.