Extract or estimate variables from landscape objects (class 'sf').

extract_variables(x, vars = "land_cover_type", SpParams = NULL, ...)

plot_variable(x, variable = "land_cover_type", SpParams = NULL, ...)

Arguments

x

An object of class sf with the appropriate columns.

vars

A string vector with the name of the variables to extract (see details).

SpParams

A data frame with species parameters (see SpParamsMED), required for most forest stand variables.

...

Additional arguments (not used).

variable

A string with the name of the variables to draw (see details).

Value

An object of class sf with the desired variables.

Details

The following string values are available for vars. Topography:

  • "elevation":Elevation in m.

  • "slope":Slope in degrees.

  • "aspect":Slope in degrees.

  • "land_cover_type":Land cover type.

Soil:

  • "texture1":Texture class of the first soil layer.

  • "texture2":Texture class of the second soil layer.

  • "texture3":Texture class of the third soil layer.

  • "soilvolextract":Total water extractable volume (mm).

  • "soilvolsat":Total water volume at saturation (mm).

  • "soilvolfc":Total water volume at field capacity (mm).

  • "soilvolwp":Total water volume at wilting point (mm).

  • "soilvolcurr":Current total water volume (mm).

Watershed:

  • "num_neigh":Number of cell neighbours (integer).

  • "water_order":Cell order for lateral water transfer (integer).

  • "outlets":Water outlet (TRUE/FALSE).

  • "channel":Water channel (TRUE/FALSE).

  • "depth_to_bedrock":Depth to bedrock (m).

  • "bedrock_porosity":Bedrock porosity.

  • "bedrock_conductivity":Bedrock conductivity.

  • "aquifer_elevation":Aquifer elevation over bedrock (m).

  • "depth_to_aquifer":Depth to aquifer (m).

  • "aquifer_volume":Aquifer volume (mm).

  • "snowpack":Snowpack water equivalent (mm).

Forest stand:

  • "basal_area":Basal area (m2/ha).

  • "leaf_area_index":Leaf area index (m2/m2).

  • "foliar_biomass":Foliar biomass (kg/m2).

  • "fuel_loading":Fine live fuel loading (kg/m2).

  • "shrub_volume":Shrub shrub_volume (m3/m2).

See also

forest, soil, summary.forest, shinyplot_land

Author

Miquel De Cáceres Ainsa, CREAF.

Examples

# Load data and species parameters from medfate
data(example_ifn)
data(SpParamsMED)
  
# Calculate basal area and leaf area index
# for all forest stands
extract_variables(example_ifn, vars = c("basal_area", "leaf_area_index"),
                  SpParams = SpParamsMED)
#> Simple feature collection with 100 features and 2 fields
#> Geometry type: POINT
#> Dimension:     XY
#> Bounding box:  xmin: 1.817095 ymin: 41.93301 xmax: 2.142956 ymax: 41.99881
#> Geodetic CRS:  WGS 84
#> # A tibble: 100 × 3
#>               geometry basal_area leaf_area_index
#>            <POINT [°]>      <dbl>           <dbl>
#>  1 (2.130641 41.99872)      13.9            5.29 
#>  2 (2.142714 41.99881)      15.7            2.91 
#>  3 (1.828998 41.98704)       0              0.833
#>  4 (1.841068 41.98716)       0              3.03 
#>  5 (1.853138 41.98728)       0              1.79 
#>  6 (1.901418 41.98775)       0              2.76 
#>  7 (1.937629 41.98809)      19.7            5.88 
#>  8  (1.949699 41.9882)       9.91           3.45 
#>  9  (1.96177 41.98831)       0              2.41 
#> 10  (1.97384 41.98842)      19.8            3.75 
#> # ℹ 90 more rows