Methods for standingTree Object Construction in Package sampSurf
There are currently two available methods for the generic
standingTree. These methods generate objects of class
standingTree" that are valid objects. This is the
preferred method for generating such objects, rather then using
signature(object = "missing")
This constructor will be used when the signature argument is "missing." When
missing, the taper data is generated from the internal taper function between the
buttDiam(derived internally from taper data) and
topDiamdiameters for the tree, in
nSegssections. The taper function used is documented in “The Stem Class” vignette and references for "
standingTree." The following arguments are part of the function call; all arguments with the same names as class slots are also defined in the class definition (and may be stored differently than the arguments).
standingTree( dbh = 20, #cm topDiam = 0, #cm height = 15, #meters nSegs = 20, solidType = 3, #must have some taper model for butt diam treeVol = NULL, surfaceArea = NULL, biomass = NA, vol2wgt = NA, carbon = NA, wgt2carbon = NA, centerOffset = c(x=0, y=0), #tree base-pith center offset species = '', treeID = paste('tree',.StemEnv$randomID(),sep=':'), description = NULL, userExtra = NULL, units = 'metric', spUnits = CRS(projargs=as.character(NA)), runQuiet = TRUE, ... )
dbh: The breast-height diameter. For object creation, units are in either inches or cm. Internally, within the object, they are stored in the same units as height: feet or meters, depending on the value for
topDiam: The tree diameter at the tip with same units as
height: The tree height in meters or feet, depending on
nSegs: The number of height segements to be generated from the taper function for the "missing" signature. Note that there will be
nSegs+1diameter measurements for the tree taper.
solidType: The type of solid for the default taper equation; the range is from 1 to 10, with 1 being a neiloid, 2 a cone and 3+ a paraboloid. When the
objectargument is missing it defaults to a value of 3.
treeVol: The tree volume if precomputed, otherwise, if
NULL, the tree volume will be computed from the taper volume equation or Smalian's formula if
surfaceArea: The tree surface area if precomputed, otherwise, if
NULL, the tree surface area will be computed from the taper equation or spline approximation.
biomass: The tree stem woody biomass if precomputed, otherwise, if
NA, the tree biomass will be computed from the volume and
vol2wgt: The volume to weight conversion factor. If
biomassis passed, then it will be computed.
carbon: The tree carbon content if precomputed, otherwise, if
NA, the carbon content will be computed from the biomass and
wgt2carbon: The weight to carbon conversion factor. If
carbonis passed, then it will be computed.
centerOffset: The tree's center position (pith at
dbh) that will be used for the
locationslot. This is a vector of length two with names "x" and "y"; note that it can be length three with a "z" coordinate, but it is not used anywhere currently.
species: Some species identifier as a character string.
treeID: Each tree should have its own unique identifier that is used in constructing the
Polygonsobject for the perimeter. This becomes very important when combining individual trees into a population or collection via the container class "
standingTrees." If nothing is supplied, a random ID is generated.
description: A character vector description of the tree.
userExtra: Anything else that one wants to carry along with the tree.
units: Either “English” or “metric”. These must be conformable with the projection in
spUnits: A valid
CRSobject specifying the Coordinate Reference System. This defaults to
NA, which means you want to use your own user-defined system, say for a sample plot where the tree has been located in the field.
TRUE: no feedback during object creation;
FALSE: prints some information along the way.
... : Other arguments to be passed along.
signature(object = "data.frame")
objectis a "data.frame," then it is assumed that the data frame contains the taper data in the form of diameters and heights (as columns with labels "diameter" and "height", respectively), with diameters in the same units as height. All arguments except those listed below are the same as in the previous constructor...
standingTree(object solidType = NULL, #defaults to null for passed taper treeVol = NULL, surfaceArea = NULL, biomass = NA, vol2wgt = NA, carbon = NA, wgt2carbon = NA, centerOffset = c(x=0, y=0), #tree base-pith center offset species = '', treeID = paste('tree',.StemEnv$randomID(),sep=':'), description = NULL, userExtra = NULL, units = 'metric', spUnits = CRS(projargs=as.character(NA)), runQuiet = TRUE, ...)
object: A data frame (see note below).
NULLis the default, because it is assumed that the taper data are from field measurements or have been generated from a different taper equation where this would not be a meaningful parameter. One can therefore have an educated guess about the genesis of taper data within an object by querying this slot in the completed object.
treeVol: The tree volume if precomputed, otherwise, if
NULL, the tree volume will be computed from the taper data frame using Smalian's method.
It may not be immediately apparent how the taper data in the data
frame is to be structured if you have this data available either from
measurements, or from a different taper equation. The best way to
check this out is to simply create a dummy "standingTree" object and then
@ operator applied to
taper slot. Please also see the vignette mentioned
above. Remember, the diameters in the taper data frame are expected to
be in the same units as length for a data frame.
Jeffrey H. Gove
standingTree" class and the
1 2 3