Rsagacmd
Rsagacmd copied to clipboard
Error in `saga_execute()`:
Hi There,
I'm trying to use rsagacmd package with a SpatRaster dem. When I run saga <- saga_gis(raster_backend = "terra"), the object is created. Yet, when I run saga_dah_rast <- saga$ta_morphometry$diurnal_anisotropic_heat(dem = dem_rast)
I get the following error message:
Error in saga_execute()
:
! Error: input file [C:\Users\RCHICALO\Documents\dem_UPSA.tif]
Error: Elevation
Backtrace:
- saga$ta_morphometry$terrain_ruggedness_index_tri(...)
- Rsagacmd::saga_execute(lib, tool, senv, .intern, .all_outputs, .verbose, args)
Can you offer potential solutions? I thought that there was an issue with the package calling on SAGA-GIS tools that I downloaded from here (https://sourceforge.net/projects/saga-gis/), but now understand that the saga_gis function wouldn't run if there was an issue with that. Do I have that right?
Please help!
Roxy
Hello, this seems to work for me (using the example DEM):
library(Rsagacmd)
library(terra)
saga <- saga_gis(raster_backend = "terra")
dem <- read_srtm()
saga_dah_rast <- saga$ta_morphometry$diurnal_anisotropic_heat(dem = dem)
plot(saga_dah_rast)
Are you still having problems?