Hi All, 

With the risk of asking an obvious question: I have use the following code to 
generate hexagonal tessellation:

lambertCRS<-"+proj=laea"
coords1<-matrix(c(-30,31,-30,80,50,80,50,31,-30,31),ncol=2, byrow=TRUE)
coords=project(coords1,lambertCRS)
pg=Polygon(coords)
HexPts=spsample(pg, type="hexagonal", n=1750, offset=c(0,0),border=FALSE) 
HexPols = HexPoints2SpatialPolygons(HexPts) 
proj4string(HexPols)<-lambertCRS 
baseCRS<-CRS("+proj=longlat +ellps=WGS84")
HexPolsLatLon<-spTransform(HexPols,baseCRS)

What I am trying to do next is to generate the same tessellation but using 
squares instead of hexagons. This can be achieved by using: spsample(pg, 
type="regular", n=1750, offset=c(0,0),border=FALSE)
but I do not know how to convert the resulting points to spatial polygons.

Thank you very much.

Cheers,
Bogdan
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to