Is there a way to extract covariates from point shapefiles to habitat masks? Since density can not be modeled by trap covariates, I was trying to circumvent this by making the detector a shapefile with all my covariates included therein and then add covariates of this shapefile to the mask.
For each trap site, the respective covariates are 1) distance to feeders and 2) three metrics of woody cover. I have a feeder shapefile (point vector) and TIF rasters for woody cover metrics. I have extracted all relevant metrics at each trap site. Alternatively, I've tried the "distance.to.shore" example in vignettes. Any ideas?
#####################################
#Mask
library(rgdal)
bobmask<- readOGR(".", "bobmask")
trapcov<- readOGR(".", "arc_trap")
bobMASK <- make.mask(alltraps, spacing = 165.2601,
buffer = 777, type = "trapbuffer", poly = bobmask, nx=32)
par(mar = c(1,6,6,6), xpd = TRUE)
plot (bobMASK, ppoly = TRUE)
plot(alltraps, add = T)
par(mar = c(5,4,4,2) + 0.1, xpd = FALSE)
tcov_frame<-data.frame(trapcov)
addCovariates(bobMASK, tcov_frame)