seed_tree_distmap {quaxnat} | R Documentation |
Distance map to nearest seed source
Description
Creation of a distance map for the study area. The distance to the nearest seed source is calculated for every raster cell.
Usage
seed_tree_distmap(raster, species)
Arguments
raster |
Raster data set with tree species classification of specific tree species and tree species groups. |
species |
Represents the numerical value by which the tree species of interest is encoded in the raster data set. |
Value
A SpatRaster object containing the distances to seed source. The object has the same resolution and extent as the input raster.
Examples
## Create raster data set
rr <- terra::rast(
matrix(sample(0:10, 20 * 20, replace = TRUE),
nrow = 20, ncol = 20))
## Compute distance for study area
distance <- seed_tree_distmap(raster = rr, species = "10")
## Plot the seed_tree_distmap
terra::plot(distance)
[Package quaxnat version 1.0.0 Index]