extractPts: Extract values from a Raster* of SpatRaster object

View source: R/raster.R

extractPtsR Documentation

Extract values from a Raster* of SpatRaster object

Description

Extract values from a Raster* of SpatRaster object

Usage

extractPts(pts, x)

Arguments

pts

location info for points to be extracted. Must be a data frame or matrix with either set of the following columns. Note that layer (or z) may be either a layer index number or layer names. If 'cell' is present in the input then [x or lon] and [y or lat] are ignored.

  • 'cell' and 'layer' (or 'z')

  • 'row', 'col' and 'layer' (or 'z')

  • 'lon', 'lat' and 'layer' (or 'z')

  • 'x', 'y' and 'layer' (or 'z')

x

a single or multilayer Raster* object. If x has only one layer then pts is passed to raster::extract() immediately.

Value

a vector of values


BigelowLab/rasf documentation built on July 18, 2022, 10:19 p.m.