Skip to contents

treefromthesky

Usage

treefromthesky(dat)

Arguments

dat

1 row data.frame with columns: "Xutm", "Yutm" (Tree coordinates) and "CrownDiameter".

Value

A circle (sfc_POLYGON) representing the tree crown, with its diameter filled in, representing the tree from the sky.

Examples

data(Paracou6_2016)
data(ForestZoneVolumeParametersTable)

inventory <- addtreedim(cleaninventory(Paracou6_2016, PlotMask),
volumeparameters = ForestZoneVolumeParametersTable)

dat <- inventory %>%
  dplyr::filter(CrownDiameter == max(CrownDiameter))

Crown <- treefromthesky(dat)

library(ggplot2)
ggplot() +
 geom_sf(data = sf::st_as_sf(inventory, coords = c("Xutm", "Yutm"))) +
 geom_sf(data = Crown, fill = "forestgreen") # trees polygons