xfer_userExtent: xfer_userExtent: user provided extent of transfer

View source: R/xfer_userExtent.R

xfer_userExtentR Documentation

xfer_userExtent: user provided extent of transfer

Description

This function generates an area of transfer according to a user provided polygon and buffer.

Usage

xfer_userExtent(bgShp_path, bgShp_name, userBgBuf, logger = NULL, spN = NULL)

Arguments

bgShp_path

path to the user provided shapefile or csv with vertex coordinates.

bgShp_name

name of the user provided shapefile or csv with vertex coordinates.

userBgBuf

numeric. Buffer to be used in creating the background extent must be >= 0.

logger

Stores all notification messages to be displayed in the Log Window of Wallace GUI. Insert the logger reactive list here for running in shiny, otherwise leave the default NULL.

spN

data frame of cleaned occurrences obtained from component occs: Obtain occurrence data. Used to obtain species name for logger messages.

Details

This function is used in the transfer component. Here, the user provides either a shapefile or a csv with vertex coordinates with the desired shape for the extent of transfer, the user may include a buffer to the given polygon. The function returns a SpatialPolygons object of the desired extent (+ buffer).

Value

This function returns a SpatialPolygons object with the user provided shape (+ a buffer is userBgBuf >0).

Author(s)

Jamie Kass <jamie.m.kass@gmail.com>

Gonzalo E. Pinilla-Buitrago <gepinillab@gmail.com>

Andrea Paz <paz.andreita@gmail.com>

See Also

penvs_drawBgExtent, penvs_bgExtent, penvs_bgMask , penvs_bgSample

Examples

pathShp <- list.files(system.file("extdata/shp", package = "wallace"),
                      full.names = TRUE)
nameShp <- list.files(system.file("extdata/shp", package = "wallace"),
                      full.names = FALSE)
xferUser <- xfer_userExtent(bgShp_path = pathShp, bgShp_name = nameShp,
                            userBgBuf = 1)

wallace documentation built on Sept. 26, 2023, 1:06 a.m.