Skip to contents

Using camera trap locations generated with camtrapmonitoring functions sample_ct() and grid_ct(), sample raster layers to characterize and select camera trap locations, and quantify potential sampling bias.

Usage

eval_pt(features, target, layer = 1)

Arguments

features

sf features (see sf::st_sf())

target

SpatRaster target (see terra::rast())

layer

default 1, see terra::extract()

Value

vector of values from target matching locations in features

See also

Other eval: eval_buffer(), eval_dist()

Examples

library(terra)

data("clearwater_lake_density")
clearwater_lake_land_cover <- rast(system.file('extdata',
  'clearwater_lake_land_cover.tif', package = 'camtrapmonitoring'))

# Sample points
pts <- sample_ct(region = clearwater_lake_density, n = 1, type = 'random')

# Make grid with queen's case
queen <- grid_ct(features = pts, case = 'queen', distance = 100)

# Evaluate each point with the land cover layer
queen$lc <- eval_pt(features = queen, target = clearwater_lake_land_cover)

plot(queen["lc"])