merge_area | R Documentation |
Merge rasters over a gridded study area.
merge_area( an_area = NULL, to_merge_area = NULL, var_names = NULL, new_name = NULL, dir_path = NULL )
an_area |
A |
to_merge_area |
A path to a |
var_names |
A list of variable names to keep on cells. It try to match each variable name (ignoring case and partially matched) in the study area. Variables are calculated using the average of features (polygons or lines) coverage by each cell. |
new_name |
A name to new area study after merge rasters over area. the average of features (polygons or lines) coverage by each cell. |
A SDM_area
object containing variables merged with. If the CRS of the Raster*
is
different from the CRS of the SDM_area
object, it is reproject. The merging process
produces cells intersecting SDM_area
object and Raster*
.
## Not run: SPDF <- readOGR( system.file("vect_files/brasil_uf.gpkg", package="sdmTools"), layer = "brasil_uf", verbose = F ) gridded_area <- SPDF %>% sdm_area("Test area", "EPSG:6933", c(50000, 50000)) %>% make_grid(var_names = list(), new_name = T) gridded_area <- gridded_area %>% merge_area( system.file("rast_files", package="sdmTools"), var_names = list("bio_5m_01", "bio_5m_02") ) gridded_area$study_area@data %>% head() ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.