Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

SpatialPixels-class

Class "SpatialPixels"


Description

class for defining a pixels, forming a possibly incomplete rectangular grid of arbitrary dimension

Objects from the Class

Objects are created by using e.g.

SpatialPixels(points)

with points of class SpatialPoints-class

Slots

grid

object of class GridTopology-class, defining the grid topology (offset, cellsize, dim)

grid.index

integer; index of points in full grid

coords

coordinates of points, or bbox of grid

bbox:

Object of class "matrix"; bounding box

proj4string:

Object of class "CRS"; projection

Extends

Class "SpatialPoints" directly; Class "Spatial", by class "SpatialPoints".

Methods

coordinates

signature(x = "SpatialPixels"): calculates coordinates for each point on the grid; coordinates are not stored in objects of class SpatialGrid

summary

signature(object = "SpatialPixels"): summarize object

plot

signature(x = "SpatialPixels"): plots cell centers

"["

signature(x = "SpatialPixels"): select pixel cells; the argument drop=FALSE (default) does not recalculate grid topology for the selection, if drop=TRUE the grid topology is recomputed, and might change.

rbind

signature(x = "SpatialPixels"): rbind-like method

Author(s)

See Also

Examples

data(meuse.grid)
pts = meuse.grid[c("x", "y")]
y = SpatialPixels(SpatialPoints(pts))
class(y)
y
summary(y)
plot(y) # plots grid
plot(y, grid = FALSE) # plots points

sp

Classes and Methods for Spatial Data

v1.4-5
GPL (>= 2)
Authors
Edzer Pebesma [aut, cre], Roger Bivand [aut], Barry Rowlingson [ctb], Virgilio Gomez-Rubio [ctb], Robert Hijmans [ctb], Michael Sumner [ctb], Don MacQueen [ctb], Jim Lemon [ctb], Finn Lindgren [ctb], Josh O'Brien [ctb], Joseph O'Rourke [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.