eoo: Extent of occurrence of a species based on convex hull...

Description Usage Arguments Details Value Examples

View source: R/helpers.R

Description

Extent of occurrence of a species based on convex hull polygons

Usage

1
eoo(occurrences, polygons)

Arguments

occurrences

a data.frame containing geographic coordinates of species occurrences, columns must be: Species, Longitude, and Latitude. Geographic coordinates must be in decimal degrees (WGS84).

polygons

SpatialPolygons object to clip convex hulls to these limits. Projection must be WGS84 (EPSG:4326).

Details

Areas are calculated in square kilometers using the Lambert Azimuthal Equal Area projection, centered on the centroid of occurrence points given as inputs.

Value

A list containing a SpatialPolygonsDataFrame of the extent of occurrence, and a vector with the areas in km2 of the spatial polygons resulted. Projection of resulting spatial object is Lambert Azimuthal Equal Area.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# occurrences
data("occ_f", package = "rangemap")
occ <- unique(occ_f)

# polygons
poly <- simple_wmap("simple", "Cuba")
LAEA <- LAEA_projection(occ[, 2:3])
poly_pr <- sp::spTransform(poly, LAEA)

# to fix topology problems
poly_pr <- rgeos::gBuffer(poly_pr, width = 0)

# EOO
eoo_pe <- eoo(occurrences = occ, polygons = poly_pr)

rangemap documentation built on Sept. 5, 2021, 5:17 p.m.