sample_random function

Point Cloud Decimation Algorithm

Point Cloud Decimation Algorithm

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).

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)

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(rasterize_density(las)) plot(rasterize_density(thinned1))

See Also

Other point cloud decimation algorithms: sample_homogenize, sample_maxima, sample_per_voxel

  • Maintainer: Jean-Romain Roussel
  • License: GPL-3
  • Last published: 2024-07-09