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:
$io_gdal
NULL
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
$workspace
[1] "C:/HY-Data/HRIIHIMA/data/DEM10_Fenno/"
$cmd
[1] "saga_cmd.exe"
$path
[1] "C:/Program Files/QGIS Wien/apps/saga/"
$modules
[1] "C:/Program Files/QGIS Wien/apps/saga/modules/"
$version
[1] "2.1.2"
$cores
[1] NA
$parallel
[1] FALSE
$lib.prefix
[1] ""
Screenshot:
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?