1

I want to create a topographic wetness index (TWI) in R and I am trying to set an environment according to the help of RSAGA-package but I am always facing with an error appears in a different term.

my code is as follows:

library("RSAGA")
library("envirem")
myenv <- rsaga.env()
myenv <- rsaga.env(workspace = ".",path ="C:/OSGeo4W64/apps/saga-ltr"
               ,modules ="C:/OSGeo4W64/apps/saga-ltr/modules" )
rsaga.hillshade("dem1","hillshade205",env=myenv)
top<-topoWetnessIndex(dem1, myenv)

the error

Error in .getGDALtransient(x, filename = filename, options = options,  : 
filename exists; use overwrite=TRUE

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.