pc_2D_fdtm: Create a Digital Terrain Model from UAV generated point...

Description Usage Arguments Value Author(s) Examples

View source: R/rs_pc_2D_fdtm.R

Description

Create a Digital Terrain Model from a high density point cloud as typically derived by an optical UAV retrieval. Due to the poor estimation of ground points a minimum samopling approach is applied. It retrieves on a coarse fixed sampling gridsize the minimum value and interpolates on these samples a surface grid with a higher target resolution. this is a kind of an try and error process and provides fairly good results if the point cloud shows at least some real surface points on a not to coarse grid.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
pc_2D_fdtm(
  laspcFile = NULL,
  grassVersion = 1,
  searchPath = NULL,
  gisdbasePath = NULL,
  tension = 20,
  sampleMethod = "min",
  cutExtent = NULL,
  sampleGridSize = 25,
  targetGridSize = 0.1,
  splineThresGridSize = 0.5,
  projFolder = NULL,
  proj4 = "+proj=utm +zone=32 +datum=WGS84 +units=m +no_defs",
  giLinks = NULL,
  verbose = FALSE
)

Arguments

laspcFile

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

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

gisdbasePath

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

tension

numeric. tension of spline interpolation.

sampleMethod

character. sampling method of r.in.lidar Statistic to use for raster values Options: n, min, max, range, sum, mean, stddev, variance, coeff_var, median, percentile, skewness, trimmean Default: mean

cutExtent

clip area

sampleGridSize

numeric, resolution extraction raster

targetGridSize

numeric. the resolution of the target DTM raster

splineThresGridSize

numeric. threshold of minimum gridsize tha is used for splininterpolation if the desired resolution is finer a two step approximation is choosen first step spline interpolation using the treshold gridsize second step bilinear resampling to the desired targetGridSize.

projFolder

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

proj4

character. valid proj4 string that should be assumingly the correct one

giLinks

list of link2GI cli pathes, default is NULL

verbose

to be quiet (1)

Value

raster* object

Author(s)

Chris Reudenbach

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
## 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)                 
                }


## End(Not run)

uavRst documentation built on Dec. 30, 2019, 5:06 p.m.