Skip to content
Prev 5164 / 29559 Next

RSAGA .asc morphology loop question

Hi Tim,

the rsaga.esri.wrapper currently expects the in.* and out.* arguments 
(with the ASCII/float ESRI grids) to have NO file extension - the file 
extension to be used for all ESRI grids can be given by the 
esri.extension argument; it currently defaults to ".asc" when 
format="ascii" and to ".flt" when format="binary". (Sorry that the help 
file is not explicit enough regarding the file extensions; will add this 
to the next update.)

Two more remarks on your code:

 >   read.ascii.grid(i)
This simply reads the grid but does nothing else - redundant.

 > prec=1
Slope is calculated in radians (see ?rsaga.slope). So with a 0.1 radian 
increment (the smallest increment that can be represented with prec=1 
digits) you get 0.1 * 180 / pi = 5.7 degree increments on the degree 
scale - you probably want to haver a finer discretization. I would 
recommend prec=3 in the case of slope (and probably prec=6 or 7 for 
curvature attributes).

I hope this helps.

Cheers
  Alex
Tim Sippel wrote: