Skip to contents

Get Rangeland Analysis Platform (RAP) Grids

Usage

get_rap(
  x,
  years = c(1986, 1996, 2006, 2016),
  filename = NULL,
  product = c("vegetation-biomass", "vegetation-cover"),
  version = "v3",
  progress = NULL
)

Arguments

x

Target extent. Derived from an sf, terra, raster or sp object or numeric vector containing xmin, ymax, xmax, ymin in WGS84 longitude/latitude decimal degrees (EPSG:4326).

years

integer. Year(s) to query

filename

Output filename (optional; default stores in temporary files, see terra::sources())

product

Target data: "vegetation-biomass" and/or "vegetation-cover"

version

Target version: "v3" and/or "v2"

progress

logical. Show progress bar? Default: missing (NULL) will use progress bar when three or more layers are requested.

Value

a SpatRaster containing the requested vegetation-biomass and/or vegetation-cover layers by year. Native cell resolution is ~30m x 30m in WGS84 decimal degrees.

Details

You can query annual biomass and cover (versions 2 and 3) from 1986 to present

  • product = "vegetation-biomass" returns two layers per year:

    • "annual forb and grass", "perennial forb and grass" (lbs / acre)

  • product = "vegetation-cover" returns six layers per year:

    • "annual forb and grass", "bare ground", "litter", "perennial forb and grass", "shrub", "tree" (% cover)

When a filename argument is not specified, unique temporary files will be generated. The resulting SpatRaster object will retain reference to these files, and you can remove them manually with unlink(terra::sources(<SpatRaster)).

When a filename is specified, temporary files will be removed after the result (often a multi- year/layer/product) SpatRaster is written to new file.

In lieu of a spatial object from {terra}, {raster}, {sf} or {sp} packages you may specify a bounding box using a numeric vector containing xmin, ymax, xmax, ymin in WGS84 longitude/latitude decimal degrees (corresponding to order used in gdal_translate -projwin option). e.g. get_rap(x = c(-120, 37, -119.99, 36.99), ...).

(1: xmin, 2: ymax)--------------------------|
        |                                   |
        |         TARGET EXTENT             |
        |  x = c(xmin, ymax, xmax, ymin)    |
        |                                   |
        |---------------------------(3: xmax, 4: ymin)