as.raster.lasmetrics

0th

Percentile

Transform a lasmetrics object into a spatial RasterLayer object

Transform a lasmetrics object into a spatial RasterLayer object

Usage
# S3 method for lasmetrics
as.raster(x, z = NULL, fun.aggregate = mean, ...)
Arguments
x

a lasmetrics object

z

character. If 3 columns or more, the names of the field to extract. If NULL returns a RasterStack instead of a RasterLayer.

fun.aggregate

Should the data be aggregated before casting? If the table does not contain a single observation for each cell, then aggregation defaults to mean value with a message.

...

Internal use only.

Value

A RasterLayer object from package raster or a RasterStack if there are several layers.

See Also

grid_metrics grid_canopy grid_canopy raster

Other cast: as.lasmetrics, as.spatial

Aliases
  • as.raster.lasmetrics
Examples
# NOT RUN {
LASfile <- system.file("extdata", "Megaplot.laz", package="lidR")
lidar = readLAS(LASfile)

meanHeight = grid_metrics(lidar, mean(Z))
rmeanHeight = as.raster(meanHeight)
# }
Documentation reproduced from package lidR, version 1.3.0, License: GPL-3

Community examples

Looks like there are no examples yet.