intersectFIA: Intersect FIA data with spatial polygons

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/intersectFIA.R

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

1
intersectFIA(db, polys, nCores = 1)

Arguments

db

FIA.Database or Remote.FIA.Database object produced from readFIA or getFIA. If a Remote.FIA.Database, data will be read in and processed state-by-state to conserve RAM (see details for an example).

polys

sp or sf Polygon/MultiPolgyon object; Areal units to bin data for estimation. Seperate estimates will be produces for region encompassed by each areal unit. FIA plot locations will be reprojected to match projection of polys object.

nCores

numeric; number of cores to use for parallel implementation. Check available cores using detectCores. Default = 1, serial processing.

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://rfia.netlify.app/

FIA Database User Guide: https://www.fia.fs.fed.us/library/database-documentation/

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

clipFIA

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data(fiaRI)
data(countiesRI)

## Perform spatial intersection
db <- intersectFIA(fiaRI,
                   countiesRI)

## Group estimates by variable defined
## in `countiesRI`
tpa(db,
    grpBy = COUNTY)

rFIA documentation built on Dec. 16, 2021, 1:07 a.m.