# NOT RUN {
require(uavRst)
require(link2GI)
# create and check the links to the GI software
giLinks<-uavRst::linkAll()
(giLinks$saga$exist & giLinks$otb$exist & giLinks$grass$exist)
{
# proj subfolders
projRootDir<-tempdir()
setwd(projRootDir)
unlink(paste0(projRootDir,"*"), force = TRUE)
projsubFolders<-c("data/","data/ref/","output/","run/","las/")
paths<-link2GI::initProj(projRootDir = projRootDir,
projFolders = projsubFolders,
global = TRUE,
path_prefix = "path_")
# get some colors
pal = mapview::mapviewPalette("mapviewTopoColors")
# get the data
utils::download.file(url="https://github.com/gisma/gismaData/raw/master/uavRst/data/lidar.las",
destfile="lasdata.las")
# create a DSM based on a uav point cloud
pc3DSM<-pc3D_dsm(lasDir = "lasdata.las",
gisdbasePath = projRootDir,
projsubFolders = projsubFolders,
gridSize = "0.5",
giLinks = giLinks)
mapview::mapview(pc3DSM[[1]])
}
##+
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab