uavRst (version 0.5-2)

pc3D_dtm: create a Digital Terrain Model from preclassified point cloud data

Description

Create a Digital Terrain Model from a high density point cloud as typically derived by an optical UAV retrieval.

Usage

pc3D_dtm(lasDir = NULL, gisdbasePath = NULL, thinGrid = "0.5",
  keepClass = "2", bulge = "1.5", splineNumber = "4",
  stepSize = "city", subSize = "ultra_fine", gridSize = "0.25",
  dtmarea = FALSE, cutExtent = NULL, projsubFolders = c("data/",
  "output/", "run/", "las/"),
  proj4 = "+proj=utm +zone=32 +datum=WGS84 +units=m +no_defs",
  cores = "3", pathLastools = NULL, giLinks = NULL, MP = "~",
  verbose = FALSE)

Arguments

lasDir

character. default is NULL path to the laz/las file(s)

gisdbasePath

character. default is NULL root directory of the project. NOTE the function creates two subfolder named run and output

thinGrid

numerical. default 0.5 meter. Grid stepsize for data thinning

keepClass

numerical. default is 2. Default ground class of las/laz conform data

bulge

numerical. default is 1.5. 'A parameter to filter spikes it is set to a stepSize/10 and then clamped into the range from 1.0 to 2.0

splineNumber

numerical. default is 3, Maximum number of spline iterations highly suggested to take odd numbers. As higher as more detailed (spurious).

stepSize

character. default is 25 meter. lastools key words if city,town,metro,nature,wilderness or experiment with free values

subSize

= character. "8", default is 8 meter. lastools key words if extra_coarse,coarse,fine,extra_fine,ultra_fine,hyper_fine or experiment with free values

gridSize

numerical. resolution of the DTM raster

dtmarea

logical. default FALSE generate polygon of valid DTM data

cutExtent

object of typ extent deteerming the clip area

projsubFolders

list of character contaiing subfolders that will be created/linked for R related GRASS processing

proj4

default is EPSG 32632, any valid proj4 string that is assumingly the correct one

cores

numerical. number of cores that will be used

pathLastools

character. folder containing the Windows binary files of the lastools

giLinks

list of GI tools cli pathes, default is NULL

MP

character mounting point / drive letter default is "~"

verbose

logical. to be quiet (1)

Examples

Run this code
# NOT RUN {
require(uavRst)
require(link2GI)

# create and check the links to the GI software
giLinks<-list()
giLinks$saga<-link2GI::linkSAGA()
if (giLinks$saga$exist) {
# proj subfolders
projRootDir<-tempdir()
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_")
setwd(paste0(projRootDir,"run"))
# 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
pc3DTM <- pc3D_dtm(lasDir =  "lasdata.las",
                      gisdbasePath = projRootDir,
                      projsubFolders = projsubFolders,
                      thinGrid = 1.,
                      splineNumber = 5 ,
                      gridSize = 0.5,
                      giLinks = giLinks)
mapview::mapview(pc3DTM[[1]]) 
}
# }

Run the code above in your browser using DataLab