Make SpatialPolygons object from GridTopology object
Make SpatialPolygons object from GridTopology object
Converts grids of regular rectangles into a SpatialPolygons object, which can be transformed to a different projection or datum with spTransform in package rgdal. The function is not suitable for high-resolution grids. The ordering of the grid cells is as in coordinates() of the same object, and is reported by IDvaluesGridTopology.
hex: SpatialPoints object with points that are generated by hexagonal sampling; see spsample
dx: spacing of two horizontally adjacent points; if missing, this will be computed from the points
Returns
as.SpatialPolygons.GridTopology and as.SpatialPolygons.SpatialPixels return a SpatialPolygons object; IDvaluesGridTopology and IDvaluesSpatialPixels return a character vector with the object grid indices.