intersectFIA {rFIA} | R Documentation |
Intersect FIA data with spatial polygons
Description
Performs spatial intersection between FIA data and user-supplied spatial polygons (sp or sf). Polygon attributes appended to PLOT table, and hence can be used as grouping variables in subsequent calls to rFIA estimator functions. Alternative to the polys
argument in rFIA estimator functions.
Usage
intersectFIA(db, polys, nCores = 1)
Arguments
db |
|
polys |
|
nCores |
numeric; number of cores to use for parallel implementation. Check available cores using |
Details
All polygon attributes will be joined onto the PLOT table.
Primarily useful if you intend to make multiple calls to rFIA estimator functions, e.g., you need to call both tpa
and biomass
and group by spatial polygons in both cases. If using the polys
argument in each function call, spatial intersection will occur mulitple times, and hence be slower than performing the intersection a single time upfront.
Value
FIA.Database or Remote.FIA.Database, depending on specification of db
.
Author(s)
Hunter Stanke and Andrew Finley
References
rFIA website: https://doserlab.com/files/rfia/
FIA Database User Guide: https://research.fs.usda.gov/understory/forest-inventory-and-analysis-database-user-guide-nfi
Bechtold, W.A.; Patterson, P.L., eds. 2005. The Enhanced Forest Inventory and Analysis Program - National Sampling Design and Estimation Procedures. Gen. Tech. Rep. SRS - 80. Asheville, NC: U.S. Department of Agriculture, Forest Service, Southern Research Station. 85 p. https://www.srs.fs.usda.gov/pubs/gtr/gtr_srs080/gtr_srs080.pdf
Stanke, H., Finley, A. O., Weed, A. S., Walters, B. F., & Domke, G. M. (2020). rFIA: An R package for estimation of forest attributes with the US Forest Inventory and Analysis database. Environmental Modelling & Software, 127, 104664.
See Also
Examples
data(fiaRI)
data(countiesRI)
# Perform spatial intersection
db <- intersectFIA(fiaRI,
countiesRI)
# Group estimates by variable defined
# in `countiesRI`
tpa(db,
grpBy = COUNTY)