R: Filter points of interest with matching conditions

filter_poi {lidR} | R Documentation

## 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

    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)

[Package lidR version 3.2.2 Index]