reduce_point_density: Reduce the point density by keeping the point the closest to...

View source: R/reduce_point_density.R

reduce_point_densityR Documentation

Reduce the point density by keeping the point the closest to the center of a voxel of given resolution

Description

Reduce the point density by keeping the point the closest to the center of a voxel of given resolution

Usage

reduce_point_density(las, res, keep_points = FALSE)

Arguments

las

a LAS class object.

res

numeric. The voxel resolution.

keep_points

logical. Allow to keep all the points in the point cloud and label the reduced density points as is.low.density == 1 as well as the grpou of points each point belongs to (allow easy matching after running a function on the downsampled point cloud).

Value

the LAS file with lower reduced density.

Examples


file = system.file("extdata", "urban.las", package="lidUrb")
las = lidR::readLAS(file)

# reduce point density with large voxels
las = lidUrb::reduce_point_density(las,0.2)

# plot
lidR::plot(las)


Blecigne/lidUrb documentation built on Feb. 19, 2024, 9:12 a.m.