Returns an object of SpatialPolygonsDataFrame that spans the grid with spatial resolution given by size.
Arguments
extent
SpatialPolygonsDataFrame that defines the (minimum) extent of the grid to be generated.
size
size of the grid cells in m.
local.crs
definition of the local (projected) CRS the grid is spanned in. Has to be class "CRS" (from sp).
makeWGS84
Boolean switch indicating whether or not the grid is returned in WGS84. Default = TRUE.
silent
Boolean switch to suppress any (non-critical) warnings and messages. Default = FALSE.
Author
Karsten Donnay and Andrew M. Linke.
References
Andrew M. Linke, Karsten Donnay. (2017). "Scale Variability Misclassification: The Impact of Spatial Resolution on Effect Estimates in the Geographic Analysis of Foreign Aid and Conflict." Paper presented at the International Studies Association Annual Meeting, February 22-25 2017, Baltimore.
require(sp)
data(geomerge)
# Generate grid with 10 km cell size in local CRS for Nigeriastates.grid <- generateGrid(states,10000,local.crs=CRS("epsg:26391"),silent=TRUE)