R/bcharea.R

Defines functions bcharea

Documented in bcharea

bcharea <-
function(buff,traplocs){
# requires package "rgeos"
p1<-Polygon(rbind(traplocs,traplocs[1,]))
p2<-Polygons(list(p1=p1),ID=1)
p3<-SpatialPolygons(list(p2=p2))
p1ch<-gConvexHull(p3)
 ##gArea(p1ch)
 bp1<-(gBuffer(p1ch, width=buff))
 plot(bp1, col='gray')
 plot(p1ch, border='black', lwd=2, add=TRUE)
 gArea(bp1)

}
jaroyle/oSCR documentation built on Sept. 23, 2023, 12:46 p.m.