lidR (version 1.0.2)

grid_canopy: Canopy surface model

Description

Creates a canopy surface model using a LiDAR point cloud. For each pixel the function returns the highest point found. This basic method could be improved by replacing each LiDAR return with a small disk.

Usage

grid_canopy(.las, res = 2, subcircle = 0)

Arguments

.las

An object of class LAS

res

numeric. The size of a grid cell in LiDAR data coordinates units. Default is 2 meters i.e. 4 square meters.

subcircle

numeric radius of the circles. To fill empty pixels the algorithm replaces each return by a circle composed of 8 points before computing the maximum elevation in each pixel.

Value

It returns a data.table with the class lasmetrics which enables easier plotting and RasterLayer casting.

See Also

grid_metrics as.raster

Other grid_alias: grid_density

Examples

Run this code
# NOT RUN {
LASfile <- system.file("extdata", "Megaplot.laz", package="lidR")
lidar = readLAS(LASfile)

# Local maximum algorithm with a resolution of 2 meters
lidar %>% grid_canopy(2) %>% plot

# Local maximum algorithm with a resolution of 1 meters
lidar %>% grid_canopy(1) %>% plot

# Local maximum algorithm with a resolution of 1 meters replacing each
# point by a 20 cm radius circle of 8 points
lidar %>% grid_canopy(1, 0.2) %>% plot
# }

Run the code above in your browser using DataLab