bbox-methods               package:sp               R Documentation

_r_e_t_r_i_e_v_e _b_b_o_x _f_r_o_m _s_p_a_t_i_a_l _d_a_t_a

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

     retrieves spatial bounding box from spatial data

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

             bbox(obj)

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

     obj: object deriving from class "Spatial", or one of classes:
          "Line", "Lines", "Polygon" or "Polygons" 

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

     two-column matrix; the first column has the minimum, the second
     the maximum values; rows represent the spatial dimensions

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

     _o_b_j = "_S_p_a_t_i_a_l" object deriviving from class "Spatial" 

     _o_b_j = "_L_i_n_e" object deriviving from class "Line" 

     _o_b_j = "_L_i_n_e_s" object deriviving from class "Lines" 

     _o_b_j = "_P_o_l_y_g_o_n" object deriviving from class "Polygon" 

     _o_b_j = "_P_o_l_y_g_o_n_s" object deriviving from class "Polygons" 

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

     # just 9 points on a grid:
     x <- c(1,1,1,2,2,2,3,3,3)
     y <- c(1,2,3,1,2,3,1,2,3)
     xy <- cbind(x,y)
     S <- SpatialPoints(xy)
     bbox(S)

     # data.frame
     data(meuse.grid)
     coordinates(meuse.grid) <- ~x+y
     gridded(meuse.grid) <- TRUE
     bbox(meuse.grid)

