 

Hi all,

 

I wish improve this code. I have 3 raster DCM_1, DCM_2, and DCM_3 (where:
DCM= Digital Crown Model) obtained from three methodology. To apply my
analysis I wish to elevate every raster to power of 1.5 to 4.0 by 0.1.
Respect to write three times the below formula I wish to understating how
to write a unique formula to import 3 raster and output DCM_1_power15,
DCM_2_power15, DCM_3_power15, etc etc.  

 

 

#A# elevation DCM to power of a^1.5 to a^4.0 by=0.1

power<- seq(1.5, 4.0, by=0.1)

for (i in 1:length(power)){

      rsaga.grid.calculus(in.grids = c("DCM_1.sgrd"),

            out.grid = paste("DCM_1_power",i+14,".sgrd",sep=""), 

            formula = paste("a^",power[i],sep="")) }

 

thanx ale


	[[alternative HTML version deleted]]


