# NOT RUN {
require(uavRst)
require(link2GI)
# create and check the links to the GI software
giLinks<-list()
giLinks$grass<-link2GI::linkGRASS7(returnPaths = TRUE)
if (giLinks$grass$exist) {
# proj subfolders
projRootDir<-tempdir()
unlink(paste0(projRootDir,"*"), force = TRUE)
paths<-link2GI::initProj(projRootDir = projRootDir,
projFolders = c("data/","data/ref/","output/","run/","las/"),
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=paste0("lasdata.las"))
# create 2D point cloud DTM
dtm <- pc_2D_fdtm(laspcFile = "lasdata.las",
gisdbasePath = projRootDir,
tension = 20 ,
sampleGridSize = 25,
targetGridSize = 0.5,
giLinks = giLinks)
mapview::mapview(dtm)
}
# }
Run the code above in your browser using DataLab