echanges: Ecosystem changes

Description Usage Arguments Value Author(s) References Examples

Description

This function produces ecosystem-change maps by masking cell values in a layer of ecosystem changes over a target set of ecosystem variables. The function allows focusing the ecosystem-change analysis on a species distribution range.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
echanges(ps, eco = names(ps[[1:(nlayers(ps) - 
    1)]]), change = names(ps[[(nlayers(ps))]]), 
    sp_dist, eco_range = c(1, 
        100), change_vals = 1:19, 
    sp_dist_range = c(1, 
        1), spread = TRUE, 
    get_unaffected = TRUE, 
    binary_output = FALSE, 
    noDataValue = 0, 
    mc.cores = round(detectCores() * 
        0.6, 0), ...)

Arguments

ps

RasterStack or SpatialPolygonsDataFrame. Stack of spatial data, including the target ecosystem variables, a layer of changes, and an alternative layer of a species distribution range. This argument can also be a polygon geometry used to integrate such spatial data via implementation of rsp2ebv; see the ellipsis term below.

eco

character. Regular expression matching names of a subset of layers representing the target ecosystem variables. Default matches names of the first 1:(n-1) layers in ps.

change

character. Name of the layer of ecosystem changes. Default matches the name of the last layer in ps.

sp_dist

character. Name of an alternative layer representing a species distribution range. If missing then this argument is ignored.

eco_range

numeric. Range of values in the target ecosystem variable.

change_vals

numeric. Vector of values in the layer of ecosystem changes.

sp_dist_range

numeric. Range of values in the alternative layer of species. distribution range. This argument is ignored if sp_dist is missing.

spread

logical. Spread representation of ecosystem changes. Users do not need to change this argument. It is used by other rouines to fastening computation of ecosystem horizontal extents. If FALSE then the function mask cell values in the target ecosystem variables over over the layer of ecosystem changes. Default TRUE.

get_unaffected

logical. Extract unaffected areas. If FALSE then pixel values of the ecological variable across the changed areas are extracted. Default TRUE.

binary_output

logical. Produce binary outputs (masks). If FALSE then ranges of values of the ecological variable are maintained. Default FALSE.

noDataValue

numeric. Output NoDataValue. Default 0.

mc.cores

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

...

If ps is a polygon then additional arguments in rsp2ebv.

Value

RasterBrick.

Author(s)

Wilson Lara Henao <wilarhen@gmail.com> [aut, cre], Victor Gutierrez-Velez [aut], Ivan Gonzalez [aut], Maria C. Londono [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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
    ## 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.))
    
    ## Changes in layers of tree-canopy cover (TC) in the 'amazon'
    ## brick are computed:
    suppressWarnings(
    def <- echanges(amazon, eco = 'TC',
                    change = 'lossyear',
                    eco_range = c(1,80),
                    get_unaffected = TRUE,
                    binary_output = FALSE,
                    mc.cores = 2)
    )
    
    ## Function 'plotebv' allows comparing rasters using a common scale bar:
    suppressWarnings(
    plotebv(def)
)

ecochange documentation built on Sept. 8, 2021, 5:09 p.m.