Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

deforest

Deforest EBV


Description

This function can extract/subtract deforested areas from essential biodiversity variables (ebv) while focusing the analysis on a predefined area of occupancy.

Usage

deforest(stk, ebv, loss = "lossyear", 
    aoo, ebv.vals, loss.vals, 
    incremental = TRUE, 
    remnant.areas = TRUE, 
    keep.ebv = FALSE, 
    mc.cores = round(detectCores() * 
        0.6, 0))

Arguments

stk

Raster*. Stack of ebv such as that produced by rsp2ebv containing a 'lossyear' layer.

ebv

character. Name of the target layers in stk.

loss

character. Name of the 'lossyear' layer. Only for the case that it has a different name in stk. Default 'lossyear'.

aoo

character. Name of an optional binary raster in stk used to focus the analysis on a specific Area of Occupancy.

ebv.vals

numeric. Cell values in ebv. If missing then the whole range of values is processed

loss.vals

numeric. Cell values in loss. If missing then the function try to extract the values from the target layers in ebv. Otherwise the whole range of values in loss is processed.

incremental

logical. Develop incremental instead of discrete masking along the ebv.vals. Default TRUE.

remnant.areas

logical. Extract from ebv remnant areas instead of deforested areas . Default TRUE.

keep.ebv

logical. Keep in the extracted areas the corresponding cell values in ebv. Default FALSE produces binary masks: c(0,1).

mc.cores

numeric. The number of cores. Default uses around 60 percent CPU capacity.

Value

RasterBrick.

Author(s)

Wilson Lara Henao <wilarhen@temple.edu> [aut, cre], Victor Gutierrez-Velez [aut]

References

Jetz, W., McGeoch, M. A., Guralnick, R., Ferrier, S., Beck, J., Costello, M. J., ... & Meyer, C. (2019). Essential biodiversity variables for mapping and monitoring species populations. Nature Ecology & Evolution, 3(4), 539-551.

Pekel, J. F., Cottam, A., Gorelick, N., & Belward, A. S. (2016). High-resolution mapping of global surface water and its long-term changes. Nature, 540(7633), 418-422.

Hansen, M. C., Potapov, P. V., Moore, R., Hancher, M., Turubanova, S. A., Tyukavina, A., ... & Kommareddy, A. (2013). High-resolution global maps of 21st-century forest cover change. science, 342(6160), 850-853.

Sexton, J. O., Song, X. P., Feng, M., Noojipady, P., Anand, A., Huang, C., ... & Townshend, J. R. (2013). Global, 30-m resolution continuous fields of tree cover: Landsat-based rescaling of MODIS vegetation continuous fields with lidar-based estimates of error. International Journal of Digital Earth, 6(5), 427-448.

Examples

## Warnings from GDAL/PROJ are suppressed.

    ## Brick with structural Essential Biodiversity Variables covering the
    ## extent of a location in the northern Amazon basin (Colombia):
    path. <- system.file('amazon.grd',package = 'ecochange')
    amazon <- suppressWarnings(brick(path.))
    
    ## Tree-cover layers in the 'amazon' brick are both formatted and
    ## deforested:
    suppressWarnings(
        def <- deforest(amazon, names(amazon)[grepl('TC', names(amazon))],
                        ebv.vals = 0:100,
                        remnant.areas = TRUE, keep.ebv = TRUE, mc.cores = 2)
    )
    
    ## Function 'plotebv' allows comparing rasters using a common scale bar:
    suppressWarnings(
    plotebv(def)
)

ecochange

Integrating Ecological Remote Sensing Data to Derive EBV Metrics

v1.3
GPL-3
Authors
Wilson Lara Henao [aut, cre], Victor Gutierrez-Velez [aut]
Initial release
2020-10-06

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.