downsample_scene: Reduces the point cloud density

View source: R/Downsample_scene.R

downsample_sceneR Documentation

Reduces the point cloud density

Description

Reduces the point cloud density

Usage

downsample_scene(data, method, filter)

Arguments

data

LAS file of a 3D point cloud.

method

character string. Defines the method to use for downsampling. Can be "space" or "random". See details. Default = "space".

filter

numeric. The intensity of the filter that depends on the method. See details.

Details

method = "space"

a single point is conserved within a voxel of filter size.

method = "random"

randomly select a user defined proportion of the point cloud. Here, filter is the proportion of points to keep in the point cloud.

Value

The downsampled data.

Examples


#- import the tree_line_plot dataset
file <- system.file("extdata", "tree_line_plot.laz", package="viewshed3d")
tls <- lidR::readLAS(file,select="xyz")

#- reduce the point cloud density: keep one point in a voxel of 4cm.
sub = viewshed3d::downsample_scene(tls,filter=0.04)

#- plot the downsampled point cloud
lidR::plot(sub)


Blecigne/viewshed3d documentation built on Nov. 5, 2022, 9:08 p.m.