Geoscience Reference
In-Depth Information
400
300
200
100
0
2004
2006
2008
2010
2012
FIGURE 14.2
Monthly numbers of emails on the R-sig-geo mailing list, 2003-2012.
developers, encouraging users to become developers and providing searchable archives of messages
(over 13,000 messages in the case of R-sig-geo).
The maptools package (Lewin-Koh et al. 2011) predates the sp package, which was released in
April 2005, and provided definitions of classes for spatial data (Pebesma et al. 2011a). maptools
has been adapted to use sp classes; it also provides coercion methods between sp classes and other
spatial data representations in other packages. The insight underlying the design of sp classes has
been that applied statisticians tend to “see” data as represented in rectangular tables, in R data.
frame objects. Spatial analysts “see” data as rasters or “shapefiles”. If these researchers are to
work together productively, their perceptions of their data should not be changed but rather accom-
modated. The sp classes behave like data.frame objects (when attribute data are present) but can
also be handled and visualised as raster or vector data in a “spatial” way. Table 14.1 shows the range
of data objects supported, including points, lines and polygons for vector data and regular grids
for raster data; the SpatialPixels representation is a regular grid representation recording cell
centre coordinates but dropping observations with no observed attribute data.
TABLE 14.1
Family of sp Classes
Data Type
Class
Attributes
Extends
Points
SpatialPoints
None
Spatial
Points
SpatialPointsDataFrame
data.frame
SpatialPoints
Pixels
SpatialPixels
None
SpatialPoints
Pixels
SpatialPixelsDataFrame
data.frame
SpatialPixels
SpatialPointsDataFrame
Full grid
SpatialGrid
None
SpatialPixels
Full grid
SpatialGridDataFrame
data.frame
SpatialGrid
Line
Line
None
Lines
Lines
None
Line list
Lines
SpatialLines
None
Spatia l, Lines list
Lines
SpatialLinesDataFrame
data.frame
SpatialLines
Polygon
Polygon
None
Line
Polygons
Polygons
None
Polygon list
Polygons
SpatialPolygons
None
Spatial , Polygons list
Polygons
SpatialPolygon s
SpatialPolygonsDataFrame
data.frame
 
Search WWH ::




Custom Search