SpatialPoints               package:sp               R Documentation

_c_r_e_a_t_e _o_b_j_e_c_t_s _o_f _c_l_a_s_s _S_p_a_t_i_a_l_P_o_i_n_t_s _o_r _S_p_a_t_i_a_l_P_o_i_n_t_s_D_a_t_a_F_r_a_m_e

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

     create objects of class SpatialPoints-class or 
     SpatialPointsDataFrame-class from coordinates, and from
     coordinates and 'data.frame's

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

      
     SpatialPoints(coords, proj4string=CRS(as.character(NA)), bbox = NULL)
     SpatialPointsDataFrame(coords, data, coords.nrs = numeric(0), 
           proj4string = CRS(as.character(NA)), match.ID = TRUE, bbox = NULL)

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

  coords: numeric matrix or data.frame with coordinates  (each row is a
          point); in case of SpatialPointsDataFrame an object of class
          SpatialPoints-class is also allowed

proj4string: projection string of class CRS-class

    bbox: bounding box matrix, usually NULL and constructed from the
          data, but may be passed through for coercion purposes if
          clearly needed

    data: object of class 'data.frame'; the number of rows in 'data' 
          should equal the number of points in the 'coords' object

coords.nrs: numeric; if present, records the column positions where in
          'data' the coordinates were taken from (used by
          coordinates<-)

match.ID: logical; if TRUE AND coords has rownames (i.e., coerced to a
          matrix, 'dimnames(coords)[[2]]' is not NULL), AND data has
          row.names (i.e. is a data.frame), then the
          'SpatialPointsDataFrame' object is formed by matching the row
          names of both components, leaving the order of the
          coordinates in tact. Checks are done to see whether both row
          names are sufficiently unique, and all data are matched. If
          FALSE, coordinates and data are simply "glued" together. 

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

     'SpatialPoints' returns an object of class 'SpatialPoints';
     'SpatialPointsDataFrame' returns an object of class
     'SpatialPointsDataFrame';

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

     coordinates, SpatialPoints-class, SpatialPointsDataFrame-class

