Skip to contents

Extract raster values with point buffers or polygons

Usage

extract_at(
  vector = NULL,
  raster = NULL,
  id = NULL,
  func = "mean",
  mode = c("polygon", "buffer"),
  ...
)

Arguments

vector

sf/SpatVector object.

raster

SpatRaster object. or file path(s) with extensions that are GDAL-compatible.

id

character(1). Unique identifier of each point.

func

function taking one numeric vector argument.

mode

one of "polygon" (generic polygons to extract raster values with) or "buffer" (point with buffer radius)

...

Placeholder. See ?extract_at_buffer for details.

Value

A data.frame object with summarized raster values with respect to the mode (polygon or buffer) and the function.

Author

Insang Song geoissong@gmail.com

Examples

## See ?extract_at_poly and ?extract_at_buffer