View source: R/metrics_percabove.R
metrics_percabove | R Documentation |
Calculates percentage of points above specified threshold heights and mean height.
metrics_percabove(z, threshold = c(2, 5), zmin = NA)
.metrics_percabove
z |
Z coordinate of the point cloud (point heights) |
threshold |
Numeric. Threshold height(s). Default = c(2, 5). |
zmin |
numeric. Minimum |
An object of class formula
of length 2.
A list. Percent of points above mean and above threshold value(s).
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_percabove(z = Z))
m2 <- pixel_metrics(las, ~metrics_percabove(z = Z, zmin = 2), res = 20)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.