sp                    package:sp                    R Documentation

_A _p_a_c_k_a_g_e _p_r_o_v_i_d_i_n_g _c_l_a_s_s_e_s _a_n_d _m_e_t_h_o_d_s _f_o_r _s_p_a_t_i_a_l _d_a_t_a: _p_o_i_n_t_s,
_l_i_n_e_s, _p_o_l_y_g_o_n_s _a_n_d _g_r_i_d_s

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

     This package provides S4 classes for importing, manipulating and
     exporting spatial data in R, and for methods including print/show,
     plot, subset, '[', '[[', '\$', names, dim, summary, and a number
     of methods specific to spatial data handling.

_I_n_t_r_o_d_u_c_t_i_o_n:

     Several spatial statistical packages have been around for a long
     while, but no organized set of classes for spatial data has yet
     been devised. Many of the spatial packages make their own
     assumptions, or use their own class definitions for spatial data,
     making it inconvenient to move from one package to another. This
     package tries to provide a solid set of classes for many different
     types of spatial data. The idea is that spatial statistical
     packages will either support these classes (i.e., directly read
     and write them) or will provide conversion to them, so that we
     have a base class set with which any package can exchange. This
     way, many-to-many conversions can be replace with one-to-many
     conversions, provided either in this package or the spatial
     packages. Wherever possible conversion (coercion) functions are
     automatic, or provided by sp.

     External packages that depend on sp will provide importing and
     exporting from and to external GIS formats, e.g. through GDAL, OGR
     or shapelib.

     In addition, this package tries to provide convenient methods to
     print, summarize and plot such spatial data.

_D_i_m_e_n_s_i_o_n_s:

     In principal, geographical data are two-dimensional, on a flat
     surface (a map) or on a sphere (the earth). This package provides
     space for dealing with higher dimensional data where possible;
     this is e.g. very simple for points and grids, but hard to do for
     polygons. Plotting functions are devised primarily for
     two-dimensional data, or two-dimensional projections of higher
     dimensional data.

_C_o_o_r_d_i_n_a_t_e _r_e_f_e_r_e_n_c_e _s_y_s_t_e_m_s:

     Central to spatial data is that they have a coordinate reference
     system, which is coded in object of CRS class. Central to
     operations on different spatial data sets is that their coordinate
     reference system is compatible (i.e., identical). 

     This CRS can be a character string describing a reference system
     in a way understood by the PROJ.4 projection library, or a
     (character) missing value. The package spproj needs to be
     available if one wants to work with (non-missing valued)
     coordinate reference systems; this packages needs, but does not
     contain the PROJ.4 external library, and is therefore not
     available for Windows R versions on CRAN\footnote{a binary is
     available from <URL:
     http://www.sourceforge.net/projects/r-spatial/>}

_C_l_a_s_s _s_t_r_u_c_t_u_r_e:

     All spatial classes derive from a basic class 'Spatial', which
     only provides a bounding box and a CRS. This class has no useful
     instances, but useful derived classes. 

     SpatialPoints extends Spatial and has coordinates.  The method
     coordinates extracts the numeric matrix with coordinates from an
     object of class SpatialPoints, or from other (possibly derived)
     classes that have points.

     Objects of class SpatialGrid points on a regular grid. Either a
     full grid is stored or a partial grid (i.e., only the non-missing
     valued cells); calling coordinates on them will give the
     coordinates for the grid cells.

     SpatialPoints, SpatialCell and SpatialGridded can be of arbitray
     dimension, although most of the effort is in making them work for
     two dimensional data.

     SpatialLines provides lines, and SpatialPolygons provides
     polygons, i.e., lines that end where they start and do not
     intersect with itself. SpatialLines and SpatialPolygons only have
     two-dimensional data.

     SpatialPointsDataFrame extends SpatialPoints with a data slot,
     having a data.frame with attribute data. Similarly,
     SpatialCellDataFrame, SpatialLinesDataFrame,
     SpatialPolygonsDataFrame extend the primary spatial information
     with attribute data.

_R_e_f_e_r_e_n_c_e_s:

     PROJ.4: <URL: http://www.remotesensing.org/proj/>

     GDAL and OGR: <URL: http://www.remotesensing.org/gdal/>.

_A_u_t_h_o_r_s:

     sp is a collaborative effort of Edzer Pebesma, Roger Bivand, Barry
     Rowlinson and Virgilo G\'{o}mez-Rubio.

