I have 110
LAS
files for a county, and I would like to stitch/combine them all into one single LAS
file and write it to disk without bringing it into R
. Since, each LAS
file when imported into R
has a size of 1.7 GB
, I am looking for a way to combine these files without having to import them into R
or maybe there is another way.
Code:
# Import the list of LAS files in the folder
FL_LAS_List = readLAScatalog("//path")
How can I do this?
I did find this question:
Merge all tiles from lascatalog?
Code in the answer:
opt_output_files(ctg) <- "folder/singlefilename"
opt_chunk_buffer(ctg) <- 0
opt_chunk_size(ctg) <- 10000
singlefile_ctg <- catalog_retile(ctg)
However, I do have some questions.
- Why are
opt_chunk_buffer(ctg) <- 0 opt_chunk_size(ctg) <- 10000
being added? And why the value0
and10000
? - And this
singlefile_ctg <- catalog_retile(ctg)
will write the merged LAS file into the same folder as given inctg = readLAScatalog("folder/")
? Because my output path is different from the input folder.
On a side note when I run readLAScatalog()
, I get the following warning, I don't know if this is going to be an issue while merging the files.
Be careful, some tiles seem to overlap each other. lidR may return incorrect outputs with edge artifacts when processing this catalog.