Learn R Programming

gecko (version 1.0.2)

spectre.area: Get SPECTRE raster segments.

Description

Downloads SPECTRE segments according to a bounding box selection.

Usage

spectre.area(
  index,
  ext = c(-180, 180, -60, 90),
  normalize = FALSE,
  filepath = NULL
)

Value

SpatRaster.

Arguments

index

numeric. A vector of integers specifying the layers. Refer to the list.

ext

numeric or SpatExtent. A vector of xmin, xmax, ymin, ymax or a terra spatial extent object (See terra::ext()). If no input is given, an extent of xmin = -180, xmax = 180, ymin = -60, ymax = 90 is selected.

normalize

character or logical. Either logical on whether data should be normalized for the given interval or a character specifying a type of normalization. Type default to "standard". Check gecko::normalize() for more info.

filepath

character. An optional user defined path for the final output. If NULL, requested files are left in the current temp directory.

Examples

Run this code
if (FALSE) {
regional_threats = spectre.area(3, terra::ext(-17.3,-16.6,32.6,32.9), normalize = FALSE)
terra::plot(regional_threats[[1]], main = "Human Density")
}

Run the code above in your browser using DataLab