3

I have been getting this error when trying to create kernel density maps using QGIS 2.0.1 and SAGA 2.1.0. It seems to occur only when the extent is large, i.e. the entire state of Texas. If I do it on a smaller region, it works well. This occurs with any combination of settings. I also get the same error any time if I try to do any sort of Kriging, regardless of parameter settings. I have attached the error message I got and the settings I used this go-round. The log file is at the bottom.

Any ideas? I am sure others are experiencing this issue as well. I am on Ubuntu 13.04.

The error message The settings

Log File Algorithm Kernel density estimation started grid_gridding "Kernel Density Estimation" -POINTS "/home/ross/GIS/Ham Radio/NewShapes/txhams.shp" -POPULATION "wgt" -RADIUS 5280 -KERNEL 0 -TARGET 0 -USER_XMIN 343308.727344 -USER_XMAX 4398326.38181 -USER_YMIN 8477265.06341 -USER_YMAX 12335473.6077 -USER_SIZE 100 -USER_GRID "/tmp/processing/USER_GRID.tif.sgrd" io_gdal 1 -GRIDS "/tmp/processing/USER_GRID.tif.sgrd" -FORMAT 4 -TYPE 0 -FILE "/tmp/processing/52ac69fe3bfe4f939401e6b9a226a791/USER_GRID.tif" Error: grid: memory allocation failed [1872.40mb] Error: executing module [Kernel Density Estimation]


## #####

### ##

# ## ## #### #

##### ## #

# ## ##### #

library path: /usr/lib/saga/libgrid_gridding.so library name: Grid - Gridding module name : Kernel Density Estimation author : O.Conrad (c) 2010


Load shapes: /home/ross/GIS/Ham Radio/NewShapes/txhams.shp...

Parameters

Points: txhams Population: wgt Radius: 5280.000000 Kernel: quartic kernel Target Grid: user defined

Inconsistency detected by ld.so: dl-close.c: 759: _dl_close: Assertion `map->l_init_called' failed! Error: Grid file could not be opened. Error: executing module [GDAL: Export Raster]


## #####

### ##

# ## ## #### #

##### ## #

# ## ##### #

library path: /usr/lib/saga/libio_gdal.so library name: Import/Export - GDAL/OGR module name : GDAL: Export Raster author : O.Conrad (c) 2007


Load grid: /tmp/processing/USER_GRID.tif.sgrd... failed GDAL: Export Raster: could not initialize data objects Inconsistency detected by ld.so: dl-close.c: 759: _dl_close: Assertion `map->l_init_called' failed! Converting outputs Loading resulting layers Algorithm Kernel density estimation finished

1
  • 4
    Error: grid: memory allocation failed [1872.40mb] ... sounds like you are running out of RAM
    – underdark
    Commented Sep 28, 2013 at 12:41

1 Answer 1

3

As underdark pointed out, you are running out of RAM. How much RAM do you have? 64 bit system or 32 bit?

SAGA GIS always puts all datafiles completely in memory. This is one of the reasons why it is so fast, but it fails on huge files.

Things you could do to:

  • Increase the grid resolution to eg 200m.
  • You may also try to run the command directly from the command line or saga gui, when qgis is not taking up memory.
  • If you do require full resolution and the above solutions don't work you could try enabling file cache in saga gui (you will have to run through gui, afaik this is not supported in saga_cmd): in the manager window click the data tab and click again on data in the top of the tree. In the settings window you should now find an option "grid file caching". You can enable automatic mode here. Performance may be very poor when doing so. I'd really recommend increasing the grid resolution if that is an option.
1
  • Hi Johanvdw, that looks correct. I'm running 64 bit with 4gb RAM. I do plan on upgrading soon. I did some experimenting and your suggestions worked! I really appreciate both yours and underdark's help! Commented Sep 30, 2013 at 19:38

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.