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

GridTopology-class

Class "GridTopology"


Description

class for defining a rectangular grid of arbitrary dimension

Objects from the Class

Objects are created by using e.g.

GridTopology(c(0,0), c(1,1), c(5,5))

Slots

cellcentre.offset:

numeric; vector with the smallest centroid coordinates for each dimension; coordinates refer to the cell centre

cellsize:

numeric; vector with the cell size in each dimension

cells.dim:

integer; vector with number of cells in each dimension

Methods

coordinates

signature(x = "SpatialGrid"): calculates coordinates for each point on the grid

summary

signature(object = "SpatialGrid"): summarize object

coerce

signature(from = "GridTopology", to = "data.frame"): convert to data.frame with columns cellcentre.offset, cellsize and cells.dim

Author(s)

See Also

Examples

x = GridTopology(c(0,0), c(1,1), c(5,5))
class(x)
x
summary(x)
coordinates(x)
y = SpatialGrid(grid = x)
class(y)
y

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.