multi_extract {Mapinguari} | R Documentation |
Gets values from multiple rasters.
Description
multi_extract
Extract values of multiple spatial rasters for a set of geographical coordinates.
Usage
multi_extract(
raster_path,
coord,
folders = NULL,
files = NULL,
layers = NULL,
ncores = 1
)
Arguments
raster_path |
character. Path to the folder with raster folders. |
coord |
data.frame or matrix. Longitude and Latitude from where to extract raster values. |
folders |
character. folders from which to get rasters for extraction. If NULL, all folders are selected. |
files |
numeric. Index for raster files to be extracted from each folder. If NULL, all files are selected. |
layers |
numeric. Index for layers to be extracted from each raster file. If NULL, all layers are selected. |
ncores |
integer. Number of cores to use in parallel processing. |
Value
Data frame with extracted values from multiple rasters
Examples
## Not run:
# replace rasterpath with the directory on your computer containing worldclim data
temp_pres <-
multi_extract(raster_path = "mydir/rasters/worldclim/global_rasters_10min/",
coord = TtorquatusDistribution[-1],
folders = c("tmax_present", "tmin_present"))
## End(Not run)
[Package Mapinguari version 2.0.1 Index]