filter_poi: Filter points of interest with matching conditions

Description Usage Arguments Value See Also Examples

View source: R/filter_poi.R

Description

Filter points of interest (POI) from a LAS object where conditions are true.

Usage

1

Arguments

las

An object of class LAS

...

Logical predicates. Multiple conditions are combined with '&' or ','

Value

An object of class LAS

See Also

Other filters: filter_duplicates(), filter_surfacepoints(), filters

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
LASfile <- system.file("extdata", "Megaplot.laz", package="lidR")
lidar = readLAS(LASfile)

# Select the first returns classified as ground
firstground = filter_poi(lidar, Classification == 2L & ReturnNumber == 1L)

# Multiple arguments are equivalent to &
firstground = filter_poi(lidar, Classification == 2L, ReturnNumber == 1L)

# Multiple criteria
first_or_ground = filter_poi(lidar, Classification == 2L | ReturnNumber == 1L)

Example output

Loading required package: raster
Loading required package: sp

lidR documentation built on June 21, 2021, 5:07 p.m.