I'm using RSAGA (version 0.9-4) to calculate rate of change (slope) on a
series of .asc files.  I'm getting en error message saying it can't open the
grid. My code follows:

library(RSAGA)
# data directory containing my .asc files to calculate slope on
wd.in<-"C:\\my.data.dir"
setwd(wd.in)
env<-rsaga.env(path="C:\\programs\\saga_vc", cmd="saga_cmd.exe")
asc.list<-dir(wd.in, pattern='.asc$')
for (i in asc.list) {
  read.ascii.grid(i)
  rsaga.esri.wrapper(fun=rsaga.slope, in.dem=i, method="maxslope",
in.esri=T, out.esri=T, clean.up=T,
  out.slope=c(paste("SLOPE",as.character(i),sep="")), env=env,
esri.workspace=wd.in, format="ascii", georef="corner", prec=1)
  }

Here are some of the data files in my directory from my asc.list object
above:

asc.list
 [1] "tmp1_220E-15N2005-03-02.asc"   "tmp10_220E-15N2005-05-13.asc"
"tmp100_220E-15N2007-05-13.asc" "tmp101_220E-15N2007-05-21.asc"
 [5] "tmp102_220E-15N2007-05-29.asc" "tmp103_220E-15N2007-06-06.asc"
"tmp104_220E-15N2007-06-14.asc" "tmp105_220E-15N2007-06-22.asc"

The error I'm getting is below:

SAGA CMD 2.0.3
library path:   C:\programs\saga_vc/modules
library name:   ta_morphometry
module name :   Local Morphometry
author      :   (c) 2001 by O.Conrad
Load grid: tmp1_220E-15N2005-03-02.asc...
failed
error: Grid file could not be opened.
error: input file [tmp1_220E-15N2005-03-02.asc]
error: executing module [Local Morphometry]

Not sure what I've done wrong in calling in the grid files and would
appreciate advice.

Best regards,

Tim Sippel
University of Auckland

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to