Build a regular grid based on a SpatialPolygonsDataFrame.
Provide also a table of surface intersections.
Usage
getGridLayer(spdf, cellsize, spdfid = NULL)
Arguments
spdf
a SpatialPolygonsDataFrame.
cellsize
output cell size, in map units.
spdfid
identifier field in spdf, default to the first column
of the spdf data frame. (optional)
Value
A list is returned. The list contains "spdf": a SpatialPolygonsDataFrame of
a regular grid and "df": a data frame of surface intersection. df fields are id_cell: ids of the grid;
id_geo: ids of the spdf and area_pct: share of the area of the polygon in the cell
(a value of 55 means that 55% of the spdf unit is within the cell).