buffer              package:adehabitat              R Documentation

_C_o_m_p_u_t_e _B_u_f_f_e_r_s

_D_e_s_c_r_i_p_t_i_o_n:

     '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.

_U_s_a_g_e:

     buffer(pts, x, dist)
     buffer.ani(pts, fac, x, dist)
     buffer.line(xy, x, dist)

_A_r_g_u_m_e_n_t_s:

     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

_V_a_l_u_e:

     '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'.

_A_u_t_h_o_r(_s):

     Clment Calenge calenge@biomserv.univ-lyon1.fr

_S_e_e _A_l_s_o:

     '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'.

_E_x_a_m_p_l_e_s:

     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)

