set_projarea: Select area for projection based on the extent of occ points

View source: R/2.f.proj.prep.R

set_projareaR Documentation

Select area for projection based on the extent of occ points

Description

This function will create SpatialPolygons that will be used to crop/mask raster/brick objects to be used on model projections. It has several options The user can crop a squared area with an extent larger than the extent of occ.poly. By default, the "extent increase" is the maximum of latitudinal and longitudinal extent "max(abs(ext.proj[1]-ext.proj[2]), abs(ext.proj[3]-ext.proj[4]))". The result is added to each side of the occ.poly extent. This may be changed by setting "mult", which will be multiplied by the "extent increase". Latitudinal and longitudinal increase may also vary independently by setting "same=FALSE".

Usage

set_projarea(
  occ.poly,
  sp.nm = "sp",
  deg.incr = NULL,
  mult = 1,
  buffer = FALSE,
  same = TRUE
)

Arguments

occ.poly

list of species SpatialPolygons

sp.nm

name (of species) to give to saved object

deg.incr

used to manually set the increase in prediction area, relative to occ.poly

mult

how much increase or decrease buffer

buffer

should the area be cut using a buffer around occ.poly?

same

should latitudinal and longitudinal increase vary independently?

Details

The user can also set a buffer around occ.poly to cut the raster/brick object. Buffer value is, by default, calculated in the same way as "extent increase", using "max(abs(ext.proj[1]-ext.proj[2]), abs(ext.proj[3]-ext.proj[4]))". But the exact value can be defined through "deg.incr" and "mult". This method takes longer to run.

Value

SpatialPolygons (enlarged occ.poly)

See Also

set_projarea_b


HemingNM/ENMwizard documentation built on Jan. 4, 2024, 3:24 p.m.