| RLAStools | R Documentation |
Run LAStools functions from R interface
RLAStools(LAStoolsDir = "", LAStool, input, arguments = NULL)
LAStoolsDir |
Character Path. Path to LAStools bin folder. Default is |
LAStool |
Character. Name of LAStools to use. |
input |
Character Path. Input files path. |
arguments |
Character string. Desired switches to be performed. |
Adapted from LAStools Google Group Thread: OP - Luiz Estraviz
## Not run:
#--- Define input ---#
input = "F:/test"
# Define las/laz files to be processed
inFiles = glue::glue("{input}/*.laz")
# Define output directory (and creates it ... if doesn't exist)
outDir = glue::glue("{input}/info")
dir.create(outDir, showWarnings = F)
RLAStools(LAStool = "lasinfo",
input = inFiles,
cores = 4,
arguments = glue::glue("-v -odix _info -otxt -odir {outDir}"))
## End(Not run)
#--- batch ---#
dirs <- list.dirs("F:/lidar_folders", recursive = FALSE)
for(i in 1:length(dirs)){
odir <- glue::glue("{dirs[i]}/laz")
dir.create(odir)
iRss::RLAStools(LAStool = "las2las", input = glue("{dirs[i]}/*.laz"), arguments = glue::glue("-odir {odir} -olaz -cores 8") )
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.