Learn R Programming

CspStandSegmentation (version 0.1.2)

las_merge: Makes one las-object from multiple las-objects

Description

This function merges multiple las objects into one las object. The function checks if all inputs are las-objects and if they have the same CRS. The function will also add a column oci with the original cloud index to each las-object. The function will then rbind all data by the minimum set of columns. If the fill argument is set to False, columns which do not exist in all las objects will be removed. If the fill argument is set to True, missing columns will be filled with NA.

Usage

las_merge(..., oci = TRUE, fill = FALSE)

Value

A single las-object with only the overlapping column name

Arguments

...

any number of las objects

oci

add a column with the original cloud index

fill

fill missing columns with NA if it is set to False columns which do not exist in all las-objects will be removed

Examples

Run this code
las1 <- lidR::LAS(data.frame(X = runif(100), Y = runif(100), Z = runif(100)))
las2 <- lidR::LAS(data.frame(X = runif(100) + 2, Y = runif(100), Z = runif(100)))
las3 <- lidR::LAS(data.frame(X = runif(100) + 4, Y = runif(100), Z = runif(100)))
merged <- las_merge(las1, las2, las3)
str(merged)


Run the code above in your browser using DataLab