overlay-methods              package:sp              R Documentation

_M_e_t_h_o_d_s _f_o_r _s_p_a_t_i_a_l_l_y _o_v_e_r_l_a_y-_i_n_g _p_o_i_n_t_s (_g_r_i_d_s) _a_n_d _p_o_l_y_g_o_n_s _l_a_y_e_r_s

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

     overlay combines points (or grids) and polygons by performing
     point-in-polygon operation on all point-polygons combinations.

_M_e_t_h_o_d_s:


     _x = "_S_p_a_t_i_a_l_P_o_i_n_t_s", _y = "_S_p_a_t_i_a_l_P_o_l_y_g_o_n_s" returns a numeric
          vector of length equal to the number of points; the number is
          the index (number) of the polygon of 'y' in which a point
          falls; NA denotes the point does not fall in a polygon; if a
          point falls in multiple polygons, the last polygon is
          recorded.  

     _x = "_S_p_a_t_i_a_l_P_o_i_n_t_s_D_a_t_a_F_r_a_m_e", _y = "_S_p_a_t_i_a_l_P_o_l_y_g_o_n_s" equal to the
          previous method, except that an argument 'fn=xxx' is allowed,
          e.g. 'fn = mean' which will  then report a data.frame with
          the mean values of the 'x' points falling in each polygon
          (set) of 'y' 

     _x = "_S_p_a_t_i_a_l_P_o_l_y_g_o_n_s", _y = "_S_p_a_t_i_a_l_P_o_i_n_t_s" returns the polygon
          index of points in 'y'; if 'x' is a
          'SpatialPolygonsDataFrame', a data.frame with rows from 'x'
          corresponding to points in 'y' is returned.

     _x = "_S_p_a_t_i_a_l_G_r_i_d_D_a_t_a_F_r_a_m_e", _y = "_S_p_a_t_i_a_l_P_o_i_n_t_s" returns object of
          class SpatialPointsDataFrame with grid attribute values x at
          spatial point locations y; NA for NA grid cells or points
          outside grid, and NA values on NA grid cells. 

     _x = "_S_p_a_t_i_a_l_G_r_i_d", _y = "_S_p_a_t_i_a_l_P_o_i_n_t_s" returns grid values x at
          spatial point locations y; NA for NA grid cells or points
          outside the grid 

     _x = "_S_p_a_t_i_a_l_P_i_x_e_l_s_D_a_t_a_F_r_a_m_e", _y = "_S_p_a_t_i_a_l_P_o_i_n_t_s" returns grid
          values x at  spatial point locations y; NA for NA grid cells
          or points outside the grid 

     _x = "_S_p_a_t_i_a_l_P_i_x_e_l_s", _y = "_S_p_a_t_i_a_l_P_o_i_n_t_s" returns grid values x at
          spatial point locations y; NA for NA grid cells or points
          outside the grid 

_N_o_t_e:

     points on a polygon boundary and points corresponding to a polygon
     vertex are considered to be inside the polygon

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

     Edzer J. Pebesma, edzer.pebesma@uni-muenster.de

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

     overlay, point.in.polygon

