View source: R/metrics_rumple.R
metrics_rumple | R Documentation |
A wrapper of the lidR::rumple_index
function that allows to calculate rumple index without the need for CHM, and
can be used directly in the e.g. pixel_metrics
function. The function combines the two required steps,
i.e. creating a surface model, and calculating rumple index, into one.
Top surface is created using highest points within each pixel.
metrics_rumple(x, y, z, pixel_size, zmin = NA)
.metrics_rumple
x , y , z |
X, Y, Z coordinates of a point cloud |
pixel_size |
pixel size |
zmin |
numeric. Minimum |
An object of class formula
of length 2.
Same as lidR::rumple_index
- the calculated rumple index
library(lidR)
library(lidRmetrics)
LASfile <- system.file("extdata", "Megaplot.laz", package="lidR")
las <- readLAS(LASfile, select = "*", filter = "-keep_random_fraction 0.5")
m1 <- cloud_metrics(las, ~metrics_rumple(x = X, y = Y, z = Z, pixel_size = 1))
m2 <- pixel_metrics(las, ~metrics_rumple(x = X, y = Y, z = Z, pixel_size = 1), res = 20)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.