tlsSample: Resample a point cloud

Description Usage Arguments Value Examples

View source: R/methods.R

Description

Applies a sampling algorithm to reduce a point cloud's density. Sampling methods are prefixed by smp.

Usage

1
tlsSample(las, method = smp.voxelize())

Arguments

las

LAS object.

method

point sampling algorithm. Currently available: smp.voxelize and smp.randomize

Value

LAS object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
file = system.file("extdata", "pine.laz", package="TreeLS")
tls = readTLS(file)
nrow(tls@data)

### sample points systematically from a 3D voxel grid
vx = tlsSample(tls, smp.voxelize(0.05))
nrow(vx@data)

### sample half of the points randomly
rd = tlsSample(tls, smp.randomize(0.5))
nrow(rd@data)

TreeLS documentation built on Aug. 26, 2020, 5:14 p.m.