| 1 |
\name{SpatialPixelsDataFrame} |
| 2 |
\alias{SpatialPixelsDataFrame} |
| 3 |
\alias{SpatialGridDataFrame} |
| 4 |
|
| 5 |
\title{ define spatial grid with attribute data } |
| 6 |
\description{ defines spatial grid by offset, cell size and dimensions } |
| 7 |
\usage{ |
| 8 |
SpatialPixelsDataFrame(points, data, tolerance = sqrt(.Machine$double.eps), |
| 9 |
proj4string = CRS(as.character(NA)), round = NULL, grid = NULL) |
| 10 |
SpatialGridDataFrame(grid, data, proj4string = CRS(as.character(NA))) |
| 11 |
} |
| 12 |
\arguments{ |
| 13 |
\item{points}{ coordinates, either as numeric matrix or as object of class |
| 14 |
\link{SpatialPoints-class} } |
| 15 |
\item{grid}{ grid topology; object of class \link{GridTopology-class}; for |
| 16 |
calls to \code{SpatialPixelsDataFrame} a value of NULL implies that this will |
| 17 |
be derived from the point coordinates } |
| 18 |
\item{data}{ data.frame; contains the attribute (actual grid) data } |
| 19 |
\item{tolerance}{ precision up to which extent points should be |
| 20 |
exactly on a grid } |
| 21 |
\item{round}{default NULL, otherwise a value passed to as the digits argument to \code{round} for setting cell size} |
| 22 |
\item{proj4string}{object of class \link{CRS-class} in the first |
| 23 |
form only used when \code{points} does not inherit from \link{Spatial-class}} |
| 24 |
} |
| 25 |
|
| 26 |
\value{ SpatialPixelsDataFrame returns an object of class |
| 27 |
\link{SpatialPixelsDataFrame-class}; SpatialGridDataFrame returns an object |
| 28 |
of class \link{SpatialGridDataFrame-class}. |
| 29 |
} |
| 30 |
|
| 31 |
\note{ |
| 32 |
SpatialPixels stores grid topology and coordinates of the actual points, |
| 33 |
which may be in the form of a subset (set of pixels) of a full grid. To |
| 34 |
find out or change this, see \link{fullgrid} and \link{SpatialGrid-class}. |
| 35 |
} |
| 36 |
|
| 37 |
|
| 38 |
\author{ Edzer Pebesma } |
| 39 |
|
| 40 |
\seealso{ |
| 41 |
\link{gridded}, |
| 42 |
\link{gridded<-}, |
| 43 |
\link{SpatialGrid}, |
| 44 |
\link{SpatialGrid-class} |
| 45 |
} |
| 46 |
|
| 47 |
\examples{ |
| 48 |
data(meuse.grid) |
| 49 |
m = SpatialPixelsDataFrame(points = meuse.grid[c("x", "y")], data = meuse.grid) |
| 50 |
class(m) |
| 51 |
summary(m) |
| 52 |
} |
| 53 |
|
| 54 |
\keyword{spatial} |