I get this error when I'm trying to import a raster to RSAGA:

> rsaga.import.gdal(paste(rast_name, ".tif", sep=""),"RASTER", env= my_env)

Module 'GDAL: Import Raster' not found in SAGA library 'io_gdal'.
Check if module name has changed (or is misspelled)?
The following (non-interactive) modules currently exist in this SAGA library:


However that file is found from modules, defined to my_env:

> my_env <- rsaga.env(workspace=substr(path_saga, 1, nchar(path_saga)-1),
+ path=sagapath, modules=sagamods)

> my_env
[1] "C:/HY-Data/HRIIHIMA/data/DEM10_Fenno/"

[1] "saga_cmd.exe"

[1] "C:/Program Files/QGIS Wien/apps/saga/"

[1] "C:/Program Files/QGIS Wien/apps/saga/modules/"

[1] "2.1.2"

[1] NA


[1] ""

Screenshot: enter image description here

Shouldn't this command work even without explicitly tell where the libraries area, like this:

> rsaga.get.libraries()
Error in dir(path, paste("^.*\\", dll, "$", sep = "")) : 
invalid 'path' argument

It appears that rsaga can't find these libraries...

I'm using v. 3.1.2 R and v. 2.1.2 SAGA GIS

Any idea how to fix this?

1 Answer 1


Tom Hengl told me this: Set the 'check.module.exists = FALSE' and 'warn=FALSE' -> this usually does the trick (http://www.rdocumentation.org/packages/RSAGA/functions/rsaga.geoprocessor).

And Alexander Brenning told me that: did you notice the warning message,

Warning message: In rsaga.geoprocessor(lib, module, param = list(h = ""), env = env, : This RSAGA version has been tested with SAGA GIS versions 2.0.4 - 2.1.0. You seem to be using SAGA GIS 2.1.4, which may cause problems due to changes in names and definitions of SAGA module arguments, etc.

We're currently working on an RSAGA update but right now the version available on CRAN does not support SAGA 2.1.1 or higher. Module numbers and names sometimes change from one SAGA version to another, which explains the error message that you get afterwards. Sorry for the trouble, please check back soon.

  • Yes, this is most likely a version issue! I believe this would work just fine e.g. with v. 2.08.
    – reima
    May 12, 2015 at 10:43

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.