Dear Gianni,

a good reference is the book "Applied Spatia lData Analysis with R", where 
there is an example in the Chapter "6.4 Hexagonal Grids" on page 137. Try this 
example using the test data set "meuse":

> library(sp)
> data(meuse.grid)
> HexPts <- spsample(meuse.grid, type = "hexagonal", cellsize = 200)
> spplot(meuse.grid["dist"], sp.layout = list("sp.points", HexPts, col = 1))
> HexPols <- HexPoints2SpatialPolygons(HexPts)
> df <- as.data.frame(meuse.grid)[overlay(meuse.grid, HexPts), ]
> HexPolsDf<-SpatialPolygonsDataFrame(HexPols, df, match.ID = FALSE)
> spplot(HexPolsDf["dist"])

More details in the above mentioned (very helpful) book. According to the book, 
there are no classes for hexagonal grids but some useful funtions to generate 
and plot them.

Good luck!

Nils



________________________________________
Von: r-sig-geo-boun...@stat.math.ethz.ch 
[r-sig-geo-boun...@stat.math.ethz.ch]&quot; im Auftrag von &quot;gianni 
lavaredo [gianni.lavar...@gmail.com]
Gesendet: Mittwoch, 15. September 2010 17:29
Bis: r-sig-geo@stat.math.ethz.ch
Betreff: [R-sig-Geo] create an Hexagonal grid

Dear reseacher,

is there a way to create an Hexagonal grid with R?

thanks
Gianni

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to