Skip to contents

Sample the point cloud, keeping one random point per pixel or per voxel. This stage modifies the point cloud in the pipeline but does not produce any output.

Usage

sampling_voxel(res = 2, filter = "")

sampling_pixel(res = 2, filter = "")

Arguments

res

numeric. voxel resolution

filter

the 'filter' argument allows filtering of the point-cloud to work with points of interest. The available filters are those from LASlib and can be found by running filter_usage. For a given stage when a filter is applied, only the points that meet the criteria are processes. The most common strings are "-keep_first", "-keep_class 2", "drop_z_below 2". For more details see filters.

Examples

f <- system.file("extdata", "Topography.las", package="lasR")
read <- reader_las()
vox <- sampling_voxel(5)
write <- write_las()
pipeline <- read + vox + write
exec(pipeline, on = f)
#> [1] "/tmp/RtmpI3nt3B/Topography.las"