Read and buffer raster layers.
Read raster layers of environmental or other variables and crop them to a given extent around the known occurrences.
raster.read(longlat, layers = NULL, ext = 1)
longlat |
Matrix of longitude and latitude or eastness and northness (two columns in this order) of species occurrence records. |
layers |
Raster* object as defined by package raster. |
ext |
Either extent of map or buffer around the known records used to crop layers. If buffer, it is relative to the maximum distance between any two records. |
If layers are not given, the function will read either 30 arc-second (approx. 1km) or 5 arc-minutes (approx. 10km) resolution rasters from worldclim (Fick & Hijmans 2017) and landcover (Tuanmu & Jetz 2014) if red.setup() is run previously.
A RasterStack object (If no layers are given: Variables 1-19 = bioclim, 20 = elevation, 21-32 = proportion landcover, 33 = most common landcover).
Fick, S.E. & Hijmans, R.J. (2017) Worldclim 2: new 1-km spatial resolution climate surfaces for global land areas. International Journal of Climatology, in press.
Tuanmu, M.-N. & Jetz, W. (2014) A global 1-km consensus land-cover product for biodiversity and ecosystem modeling. Global Ecology and Biogeography, 23: 1031-1045.
data(red.layers) data(red.records) par(mfrow=c(1,2)) raster::plot(red.layers[[1]]) points(red.records) croppedLayers <- raster.read(red.records, red.layers, 0.1) raster::plot(croppedLayers[[1]]) points(red.records)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.