voxel_array_from_point_cloud: Convert a point cloud to a voxel array

View source: R/voxel_array_from_point_cloud_function.R

voxel_array_from_point_cloudR Documentation

Convert a point cloud to a voxel array

Description

Function that takes a point cloud in XYZ-data.frame format and returns a 3D array of custom horizontal and vertical voxel resolution.

Usage

voxel_array_from_point_cloud(
  XYZ.df,
  global.h.max = NA,
  res.xy = 5,
  res.z = 5,
  value.var = "Z",
  func = "count"
)

Arguments

XYZ.df

Lidar point cloud in XYZ-data.frame format

global.h.max

Maximal Z of the array (if not set, the maximal Z of the point cloud is taken)

res.xy

Horizontal sidelength of the voxels

res.z

Vertical sidelength of the voxels

value.var

Variable (data.frame column) from which to derive the voxel values

fun

Aggregation function ("bool", "count", "min", "mean", "max", "sum")

Value

3D array

Author(s)

Nikolai Knapp

Examples

arr <- voxel.array.from.point.cloud(XYZ.df=pc, res.xy=10, res.z=1)

niknap/slidaRtools documentation built on Oct. 16, 2024, 3:53 p.m.