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)))
     SpatialPointsDataFrame(coords, data, coords.nrs = numeric(0), 
                     proj4string = CRS(as.character(NA)), match.ID = TRUE)

_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

    data: object of class 'data.frame' or of class AttributeList-class;
          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

