I would like to be able to create a SpatialPolygons object (which is a Hexagonal grid) that covers another SpatialPolygon.
I would like all the Hexagons to have a diameter of 1km (ideally i can vary this) and for all the hexagons together to cover the whole object. The method below only seems to cover a small amount of it...
Below is my attempt using the sp
package:
require(sp)
data(meuse.riv)
meuse.sr = SpatialPolygons(list(Polygons(list(Polygon(meuse.riv)), "x")))
plot(meuse.sr)
HexPts <-spsample(meuse.sr,type="hexagonal",cellsize=1000)
HexPols <- HexPoints2SpatialPolygons(HexPts)
plot(HexPols, add=TRUE)
Any help as always is greatly appreciated...