Learn R Programming

CspStandSegmentation (version 0.1.2)

add_las_attributes: Add all las_attributes from las@data to the header of a las element

Description

The helper function adds all headings from las@data which are not part of lidR:::LASATTRIBUTES to the las header using lidR::add_lasattribute. Only attributes that are included in the header got saved when using lidR::writeLAS, this is a convenient way to add them.

Usage

add_las_attributes(las)

Value

the las file with updated header

Arguments

las

an element of lidR::LAS class

Author

Julian Frey <julian.frey@wwd.uni-freiburg.de>

Examples

Run this code

file <- system.file("extdata", "beech.las", package="CspStandSegmentation")
las <- lidR::readTLSLAS(file)

las@data$noise <- runif(nrow(las@data))
las@data$noiseZ <- las@data$var1 * las@data$Z

las <- add_las_attributes(las)

Run the code above in your browser using DataLab