generateGrid | R Documentation |
Implementation of a simple grid generation function producing a SpatialPolygonsDataFrame
to be used as target
in geomerge
.
generateGrid(extent, size, local.CRS, makeWGS84 = TRUE, silent = FALSE)
extent |
|
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". |
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. |
Returns an object of SpatialPolygonsDataFrame
that spans the grid with spatial resolution given by size.
Karsten Donnay and Andrew M. Linke.
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.
geomerge-package
, geomerge
require(sp) require(rgdal) data(geomerge) # Generate grid with 10 km cell size in local CRS for Nigeria states.grid <- generateGrid(states,10000,local.CRS=CRS("+init=epsg:26391"), silent=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.