voxelize_points function

Voxelize a point cloud

Voxelize a point cloud

Reduce the number of points by voxelizing the point cloud. If the Intensity is part of the attributes it is preserved and aggregated as mean(Intensity). Other attributes cannot be aggregated and are lost.

voxelize_points(las, res)

Arguments

  • las: An object of class LAS or LAScatalog .
  • res: numeric. The resolution of the voxels. res = 1 for a 1x1x1 cubic voxels. Optionally res = c(1,2) for non-cubic voxels (1x1x2 cuboid voxel).

Returns

If the input is a LAS object, returns a LAS object. If the input is a LAScatalog, returns a LAScatalog.

Examples

LASfile <- system.file("extdata", "Megaplot.laz", package="lidR") las = readLAS(LASfile, select = "xyz") las2 = voxelize_points(las, 5) #plot(las2, voxel = TRUE)
  • Maintainer: Jean-Romain Roussel
  • License: GPL-3
  • Last published: 2024-07-09