terrain_points_metrics {lidaRtRee}R Documentation

Computation of terrain metrics

Description

This function computes topographic variables from a point cloud

Values are computed after fitting a plane to the points. It supposes a homogeneous sampling of the plot by points. Points can be cropped on disk if center and radius are provided. In case a centre is provided, the altitude is computed by bilinear interpolation at the center location (rasterize_terrain with tin algorithm), otherwise it is the mean of the points altitude range.

Usage

terrain_points_metrics(p, centre = NULL, r = NULL)

Arguments

p

matrix, data.frame or LAS object with ground point coordinates (X, Y, Z). In case of an object which is not LAS, the object is first converted.

centre

vector. x y coordinates of center to extract points inside a disc

r

numeric. radius of disc

Value

a data.frame with altitude, exposition (gr), slope (gr) and adjR2 of plane fitting

Examples

# sample points
XYZ <- data.frame(x = runif(200, -10, 10), y = runif(200, -10, 10))
XYZ$z <- 350 + 0.3 * XYZ$x + 0.1 * XYZ$y + rnorm(200, mean = 0, sd = 0.5)
# compute terrain statistics
terrain_points_metrics(XYZ)
terrain_points_metrics(XYZ, centre = c(5, 5), r = 5)
# with a LAS object
LASfile <- system.file("extdata", "las_chablais3.laz", package="lidaRtRee")
las_chablais3 <- lidR::readLAS(LASfile)
terrain_points <- lidR::filter_ground(las_chablais3)
terrain_points_metrics(terrain_points)
terrain_points_metrics(terrain_points, centre = c(974360, 6581650), r = 10)

[Package lidaRtRee version 4.0.5 Index]