sdm_area: Creates a Study Area

View source: R/sdm_area.R

sdm_areaR Documentation

Creates a Study Area

Description

A study area (SDm_area) represents a geographic location delimited by primitive shapes (lines and polygons) and associated attribute information about characteristics of that location.

Usage

sdm_area(
  an_area = NULL,
  var_names = NULL,
  sdm_area_name = NULL,
  dir_path = NULL,
  epsg_code = NULL,
  resolution = NULL
)

Arguments

an_area

An object of package sp (https://cran.r-project.org/web/packages/sp) or a path to a file, commonly a shapefile or geopackage, representing the area of study.

epsg_code

A valid EPSG code, for example EPSG:4326.

resolution

A vector containing the resolution of the study area. The format is two numeric values (width and height) according to epsg_code used. So, the numeric values can express different types of measurement units, for example deegres or meters.

name

A name do describe the study area.

Details

The attribute information of the study area are constant in time. In contrast, the SDM_area object has an array attribute storing multiple scenarios, representing attribute information about characteristics of the location that change in time.

Value

An object representing a study area containing a sp object.

Occasional topological errors on polygons of the object are corrected. As a side effect holes inside polygons are removed.

If the epsg_code of the study area is different from the epsg_code passed to the function, the study area is reproject.

Examples

## Not run: 
SPDF <- readOGR(
   system.file("brasil_uf.gpkg", package="sdmTools"),
   layer = "brasil_uf",
   verbose = FALSE
)
new_sdm_area <- SPDF %>%
   sdm_area("Brasil", "EPSG:6933", c(50000, 50000)))

class(new_sdm_area)

plot(new_sdm_area)

## End(Not run)


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