save_tif: Save the vector format geospatial object of the 'SDM_area' to...

View source: R/save_tif.R

save_tifR Documentation

Save the vector format geospatial object of the SDM_area to a raster tif file.

Description

Save the vector format geospatial object of the SDM_area to a raster tif file.

Usage

save_tif(an_area = NULL, new_name = NULL, dir_path = NULL)

Arguments

an_area

A SDM_area object representing the area of the study.

new_name

The name of file which the sp object will be saved. The new_name will be prepended to each attribute name of the sp object. If the new_name parameter is equal to NULL, it is replaced by a name computed based on attributes of the SDM_area object.

dir_path

The path in which the file will be saved.

Examples

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

tmp_dir <- tempdir()

gridded_area %>%
   save_tif(dir_path = tmp_dir)

## End(Not run)

reginaldo-re/sdmTools documentation built on April 25, 2022, 8:08 p.m.