lidar_point_value: Extract point value from LiDAR raw raster tables (20x20m)

View source: R/lfcLiDAR.R

lidar_point_valueR Documentation

Extract point value from LiDAR raw raster tables (20x20m)

Description

lidar_point_value is a wrapper for the $point_value method of lfcLiDAR objects. See lidar.

Usage

lidar_point_value(object, sf, point_id_variable, variables)

Arguments

object

lfcLiDAR object, as created by lidar

sf

sf object with the points to extract

point_id_variable

character vector of length 1 with the name of the variable of sf that contains the point identificator (name, code...)

variables

character vector with the names of the variables to access

Value

This function returns the same sf object provided, with new columns with the values of each point for each variable requested.

See Also

Other LiDAR functions: lidar_avail_tables(), lidar_clip_and_stats(), lidar_describe_var(), lidar_get_data(), lidar_get_lowres_raster(), lidar()

Examples

if (interactive()) {
library(dplyr)
lidardb <- lidar()

points_data <-
  nfi()$get_data('plots', spatial = TRUE) |>
  dplyr::slice(1:5) |>
  dplyr::select(plot_id)

dbh_plots <- lidar_point_value(lidardb, points_data, 'plot_id', 'DBH')

# lidardb is an R6 object, so the previous example is the same as:
lidardb$point_value(points_data, 'plot_id', 'DBH')
}


MalditoBarbudo/lfcdata documentation built on May 2, 2023, 10:30 p.m.