decimate_points {lidR}R Documentation

Decimate a LAS object

Description

Reduce the number of points using several possible algorithms.

Usage

decimate_points(las, algorithm)

Arguments

las

An object of class LAS or LAScatalog.

algorithm

function. An algorithm of point decimation. lidR have: random, homogenize, highest, lowest and random_per_voxel.

Value

If the input is a LAS object, returns a LAS object. If the input is a LAScatalog, returns a LAScatalog.

Working with a LAScatalog

This section appears in each function that supports a LAScatalog as input.

In lidR when the input of a function is a LAScatalog the function uses the LAScatalog processing engine. The user can modify the engine options using the available options. A careful reading of the engine documentation is recommended before processing LAScatalogs. Each lidR function should come with a section that documents the supported engine options.

The LAScatalog engine supports .lax files that significantly improve the computation speed of spatial queries using a spatial index. Users should really take advantage a .lax files, but this is not mandatory.

Supported processing options

Supported processing options for a LAScatalog (in bold). For more details see the LAScatalog engine documentation:

Examples

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

# Select points randomly to reach an overall density of 1
thinned1 = decimate_points(las, random(1))
#plot(grid_density(las))
#plot(grid_density(thinned1))

# Select points randomly to reach an homogeneous density of 1
thinned2 = decimate_points(las, homogenize(1,5))
#plot(grid_density(thinned2))

# Select the highest point within each pixel of an overlayed grid
thinned3 = decimate_points(las, highest(5))
#plot(thinned3)

[Package lidR version 3.2.2 Index]