commonArea: Coarsening of a spatial grid

Description Usage Arguments Details Value Author(s) References Examples

View source: R/common.R

Description

coarsenGrid is a function that resamples a SpatialGridDataFrame.

Usage

1
  coarsenGrid(object,coarse=2,offset = sample(c(0:(coarse-1)),2,replace=TRUE))

Arguments

object

a SpatialGridDataFrame or gridded SpatialPixelsDataFrame

coarse

an integer telling how much the grid should be coarsened

offset

integer giving the relative offset of the first point, see details below for a closer description

Details

The function coarsenGrid is a function that samples from a SpatialGridDataFrame. The argument coarse indicates that every coarse row and column will be sampled, starting with the row and column represented in offset. offset = c(0,0) implies that the smallest x- and y-coordinates will be a part of the resampled data set, offset = c(1,1) implies that sampling will start on the second row and column.

Value

a SpatialGridDataFrame.

Author(s)

Jon Olav Skoien

References

Pebesma, E., Cornford, D., Dubois, G., Heuvelink, G.B.M., Hristopulos, D., Pilz, J., Stohlker, U., Morin, G., Skoien, J.O. INTAMAP: The design and implementation f an interoperable automated interpolation Web Service. Computers and Geosciences 37 (3), 2011.

Examples

1
2
3
4
  data(meuse.grid)
  gridded(meuse.grid) = ~x+y
  newMeuseGrid = coarsenGrid(meuse.grid,coarse=2,offset=c(1,1))
  

jskoien/intamap documentation built on March 19, 2018, 10:14 a.m.