buffer {adehabitat} | R Documentation |
buffer
compute buffers around a set of
locations.
buffer.ani
is to be used when the
points can be grouped into several categories (e.g. the relocations
of several animals monitored using radio-tracking; the function
buffer
is then applied to each animal).
buffer.line
compute buffers around a line.
buffer(pts, x, dist) buffer.ani(pts, fac, x, dist) buffer.line(xy, x, dist)
pts |
a data frame with two columns (x and y coordinates of the points) |
x |
either an object of class asc or kasc with the same
attributes as those desired for the output, or an object of class
mapattr (see storemapattr ) |
dist |
a value of distance |
fac |
a factor defining the categories of the points |
xy |
a data frame containing the coordinates of the vertices of the lines |
buffer
and buffer.line
return an object of class
asc
, with 1 for pixels
located within a specified distance of given points, and NA
otherwise.
buffer.ani
returns a data frame of class kasc
,
with each column corresponding to one level of the factor fac
.
Clément Calenge calenge@biomserv.univ-lyon1.fr
as.kasc
for additionnal information on
objects of class kasc
, import.asc
for further
information on objects of class asc
, storemapattr
for further information on objects of class mapattr
.
data(puechabon) # locs is the data frame containing the # relocations of wild boars monitored by radio-tracking locs <- puechabon$locs # sa is the "kasc" object of maps of the study area sa <- puechabon$kasc # Buffer of 500 m around all relocations bu <- buffer(locs[,4:5], sa, 500) image(bu) # displays all the pixels of the study area within 500 m # of a relocation of each monitored wild boar buani <- buffer.ani(locs[,4:5], locs[,1], sa, 500) image(buani) ## buffer around a trajectory data(puechcirc) uu <- getburst(puechcirc, burst = "CH930824") w <- ascgen(uu[,c("x","y")], nrcol = 100) out <- buffer.line(uu[,c("x","y")], w, 100) image(out) plot(uu, asc = out)