Description Usage Arguments Value Author(s) Examples
Create a Digital Surface Model from a high density point cloud as typically derived by an optical UAV retrieval. It simply samples the maximum or whatever values of a given target grid size and fills the no data holes if so.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
laspcFile |
character. default is |
gisdbasePath |
character. default is |
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 |
sampleMethod |
sampling method for point aggregation |
threshold |
numeric. percentile threshold |
cutExtent |
clip area |
targetGridSize |
numeric. the resolution of the target DTM raster |
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) |
raster* object
Chris Reudenbach
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 | ## 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="lasdata.las")
# create 2D pointcloud DSM
dsm <- pc_2D_dsm(laspcFile = "lasdata.las",
gisdbasePath = projRootDir,
sampleMethod = "max",
targetGridSize = 0.5,
giLinks = giLinks)
}
raster::plot(dsm)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.