Debian Codegraph @

tests/agg.R

raw
1 options("rgdal_show_exportToProj4_warnings"="none")
2 library(sp)
3 g = SpatialGrid(GridTopology(c(5,5), c(10,10), c(3,3)))
4 p = as(g, "SpatialPolygons")
5 p$z = c(1,0,1,0,1,0,1,0,1)
6 cc = coordinates(g)
7 pts = cbind(c(9,21,21,9,9),c(9,9,21,21,9))
8 sq = SpatialPolygons(list(Polygons(list(Polygon(pts)), "ID")))
9 rnd2 = function(x) round(x, 2)
10