# NOT RUN {
##- required packages
require(uavRst)
require(link2GI)
setwd(tempdir())
## check if OTB exists
gdal <- link2GI::linkGDAL()
saga <- link2GI::linkSAGA()
if (gdal$exist & saga$exist) {
data("mrbiko")
proj = "+proj=utm +zone=32 +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0"
mrbiko <- raster::projectRaster(mrbiko, crs = proj,method = "ngb",res = 20)
raster::writeRaster(mrbiko,"dem.tif",overwrite=TRUE)
r<-morpho_dem(dem="dem.tif",c("hillshade", "slope", "aspect", "TRI", "TPI",
"Roughness", "SLOPE", "ASPECT", "C_GENE", "C_PROF",
"C_PLAN", " C_TANG"," C_LONG", "C_CROS"),
gdalLinks= gdal,sagaLinks=saga)
r_st=raster::stack(r)
names(r_st)=names(r)
raster::plot(r_st)
}
# }
Run the code above in your browser using DataLab