Learn R Programming

uavRst (version 0.5-2)

pc3D_dsm: Create a Digital Surface Model from a UAV generated point cloud

Description

Create a Digital Surface Model from a UAV generated point cloud. Basically returns a DSM. It uses the 'r.in.lidar' function to calculate LiDAR derived raster grids. It creates a raster* object.

Usage

pc3D_dsm(lasDir = NULL, gisdbasePath = NULL, GRASSlocation = "tmp/",
  grassVersion = 1, searchPath = NULL, projsubFolders = c("data/",
  "output/", "run/", "las/"), gridSize = "0.25",
  grass_lidar_method = "mean", grass_lidar_pth = 90,
  splineNumber = "4", otb_gauss_radius = "0.5",
  smoothFilter = "gauss", dsm_minalt = 0, dsm_maxalt = 4000,
  dsm_area = FALSE, cutExtent = NULL,
  proj4 = "+proj=utm +zone=32 +datum=WGS84 +units=m +no_defs",
  gisdbase_exist = FALSE, pathLastools = NULL, giLinks = NULL,
  MP = "~", verbose = FALSE)

Arguments

lasDir

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

gisdbasePath

character. gisdbase will be linked or created depending on gisdbase_exist

GRASSlocation

character. location will be linked or created depending on gisdbase_exist

grassVersion

numeric. version of GRASS as derived by findGRASS() default is 1 (=oldest/only version) please note GRASS version later than 7.4 is not working with r.inlidar

searchPath

path to look for grass

projsubFolders

character. subfolders that will be created/linked for R related GRASS processing

gridSize

numeric. resolution for raster operations

grass_lidar_method

character. statistical method to sample the Lidar data, see also r.in.lidar help.

grass_lidar_pth

numeric. grass lidar aggregation column percentile, see also r.in.lidar help.

splineNumber

numeric. default is 4 number ob spline iterations

otb_gauss_radius

numeric. default is 0.5 radius of otb smoothing filter in meter

smoothFilter

character. default is gauss alternatives are spline or for no smoothing at all no

dsm_minalt

numeric. default is 0, minimum DTM altitude accepted

dsm_maxalt

numeric. dsm maximum altitude

dsm_area

numeric. default FALSE generate polygon of valid DSM data

cutExtent

numerical. clip area c(mix,miny,maxx,maxy)

proj4

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

gisdbase_exist

logical. default is FALSE switch if gisdbase is created or linked only

pathLastools

character. folder containing the Windows binary files of the lastools

giLinks

list. of GI tools cli paths as generated by a full call of link2GI

MP

character mounting point / drive letter default is "~"

verbose

logical. to be quiet FALSE

See Also

r.in.lidar help

Examples

Run this code
# 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