lidR (version 3.0.3)

filter_poi: Filter points of interest with matching conditions

Description

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

Usage

filter_poi(las, ...)

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

Run this code
# NOT RUN {
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)
# }

Run the code above in your browser using DataCamp Workspace