downsample_scene: Reduces the point cloud density

Description Usage Arguments Details Value Examples

View source: R/Downsample_scene.R

Description

Reduces the point cloud density

Usage

1

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

1
2
3
4
5
6
7
8
9
#- 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)

viewshed3d documentation built on April 4, 2021, 1:06 a.m.