Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

random

Point Cloud Decimation Algorithm


Description

This function is made to be used in decimate_points. It implements an algorithm that randomly removes points or pulses to reach the desired density over the whole area (see area).

Usage

random(density, use_pulse = FALSE)

Arguments

density

numeric. The desired output density.

use_pulse

logical. Decimate by removing random pulses instead of random points (requires running retrieve_pulses first)

See Also

Other point cloud decimation algorithms: homogenize(), maxima

Examples

LASfile <- system.file("extdata", "Megaplot.laz", package="lidR")
las = readLAS(LASfile, select = "xyz")

# Reach a pulse density of 1 on the overall dataset
thinned1 = decimate_points(las, random(1))
plot(grid_density(las))
plot(grid_density(thinned1))

lidR

Airborne LiDAR Data Manipulation and Visualization for Forestry Applications

v3.1.2
GPL-3
Authors
Jean-Romain Roussel [aut, cre, cph], David Auty [aut, ctb] (Reviews the documentation), Florian De Boissieu [ctb] (Fixed bugs and improved catalog features), Andrew Sánchez Meador [ctb] (Implemented wing2015() for segment_snags()), Bourdon Jean-François [ctb] (Contributed to Roussel2020() for track_sensor()), Gatziolis Demetrios [ctb] (Implemented Gatziolis2019() for track_sensor())
Initial release
2021-03-11

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.