Bins point cloud data into 3D pixels, otherwise known as 'voxels'.
Usage
voxelize(x, edge_length, threads = 1L)
Value
A data object of class 'lac_voxels', which inherits from
data.table. The output contains 4 columns: X, Y, Z, and
N. The first three columns encode the spatial coordinates of each voxel
while the fourth denotes the total number of points they contain.
Arguments
x
A data.frame or data.table
with columns containing the X, Y, and Z coordinates of every point. Any
additional columns are ignored.
edge_length
A numeric vector of length 3, containing
values for the desired X, Y, and Z dimensions of each voxel.
threads
The number of threads to use for computing the voxel data.
Default is 1.
# simulate a diagonal line of points with XYZ coordinatespc <- data.frame(X = 0:99, Y = 0:99, Z = 0:99)
# convert point data to cubic voxels of length 5voxelize(pc, edge_length = c(5,5,5))