Learn R Programming

CspStandSegmentation (version 0.1.2)

add_voxel_coordinates: Add voxel coordinates to a las file

Description

Adds the collums x_vox, y_vox and z_vox in the given ressolution to the las element. This is convenient if information has been derived in voxel space and these should be attached to the original points.

Usage

add_voxel_coordinates(las, res)

Value

las file with additional voxel coordinates

Arguments

las

an element of lidR::LAS class

res

voxel ressolution in [m]

Author

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

Details

Voxel coordinates derived with this function are identical to those derived by lidR::voxelize.

Examples

Run this code

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

las <- add_voxel_coordinates(las,res = 1)


Run the code above in your browser using DataLab