Skip to contents

Sample the point cloud, keeping one random point per pixel or per voxel or perform a poisson sampling. This stages modify the point cloud in the pipeline but do not produce any output.

Usage

sampling_voxel(res = 2, filter = "", ...)

sampling_pixel(res = 2, filter = "", ...)

sampling_poisson(distance = 2, filter = "", ...)

Arguments

res

numeric. pixel/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 processed. The most common strings are "-keep_first", "-keep_class 2", "drop_z_below 2". For more details see filters.

...

unused

distance

numeric. Minimum distance between points for poisson sampling.

Value

This stage transforms the point cloud in the pipeline. It consequently returns nothing.

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/RtmpyYmd4g/Topography.las"