rangemap_buffer generates a distributional range for a given species by buffering provided occurrences using a defined distance. Optionally, representations of the species extent of occurrence (using convex hulls) and the area of occupancy according to the IUCN criteria can also be generated. Shapefiles can be saved in the working directory if it is needed.

rangemap_buffer(occurrences, buffer_distance = 100000, polygons = NULL,
                extent_of_occurrence = TRUE, area_of_occupancy = TRUE,
                final_projection = NULL, save_shp = FALSE, name,
                overwrite = FALSE, verbose = TRUE)

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).

buffer_distance

(numeric) distance, in meters, to be used for creating the buffer areas around occurrences, default = 100000.

polygons

(optional) a SpatialPolygons* object to clip buffer areas and adjust the species range and other polygons to these limits. Projection must be WGS84 (EPSG:4326). If NULL, the default, a simplified world map will be used.

extent_of_occurrence

(logical) whether to obtain the extent of occurrence of the species based on a simple convex hull polygon; default = TRUE.

area_of_occupancy

(logical) whether to obtain the area of occupancy of the species based on a simple grid of 4 km^2 resolution; default = TRUE.

final_projection

(character) string of projection arguments for resulting Spatial objects. Arguments must be as in the PROJ.4 documentation. See CRS-class for details. If NULL, the default, projection used is WGS84 (EPSG:4326).

save_shp

(logical) if TRUE, shapefiles of the species range, occurrences, extent of occurrence, and area of occupancy will be written in the working directory. Default = FALSE.

name

(character) valid if save_shp = TRUE. The name of the shapefile to be exported. A suffix will be added to name depending on the object, as follows: species extent of occurrence = "_extent_occ", area of occupancy = "_area_occ", and occurrences = "_unique_records".

overwrite

(logical) whether or not to overwrite previous results with the same name. Default = FALSE.

verbose

(logical) whether or not to print messages about the process. Default = TRUE.

Value

A sp_range object (S4) containing: (1) a data.frame with information about the species range, and Spatial objects of (2) unique occurrences, (3) species range, (4) extent of occurrence, and (5) area of occupancy.

If extent_of_occurrence and/or area_of_occupancy = FALSE, the corresponding spatial objects in the resulting sp_range object will be empty, an areas will have a value of 0.

Details

All resulting Spatial objects in the results will be projected to the final_projection. Areas are calculated in square kilometers using the Lambert Azimuthal Equal Area projection, centered on the centroid of occurrence points given as inputs.

Examples

# \donttest{ # getting the data data("occ_p", package = "rangemap") # buffer distance dist <- 100000 buff_range <- rangemap_buffer(occurrences = occ_p, buffer_distance = dist)
#> Warning: Discarded datum Unknown based on GRS80 ellipsoid in Proj4 definition
summary(buff_range)
#> #> Summary of sp_range_iucn object #> --------------------------------------------------------------------------- #> #> Species range derived from: Buffer #> #> Species Unique_records Range_area Extent_of_occurrence #> Peltophryne empusa 27 106241.2 66357.71 #> Area_of_occupancy #> 92 #> #> #> #> Other contents: #>
#> Length Class Mode #> species_range 1 SpatialPolygonsDataFrame S4 #> species_unique_records 27 SpatialPointsDataFrame S4 #> extent_of_occurrence 1 SpatialPolygonsDataFrame S4 #> area_of_occupancy 23 SpatialPolygonsDataFrame S4
# }