View source: R/Downsample_scene.R
downsample_scene | R Documentation |
Reduces the point cloud density
downsample_scene(data, method, filter)
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. |
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.
The downsampled data.
#- 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.