| SpatialPolygons-class {sp} | R Documentation |
class to hold polygon topology (without attributes)
Objects can be created by calls to the function SpatialPolygons
polygons:Object of class "list"; list elements are
all of class Polygons-class
plotOrder:Object of class "integer"; integer array
giving the order in which objects should be plotted
bbox:Object of class "matrix"; see Spatial-class
proj4string:Object of class "CRS"; see CRS-class
Class "Spatial", directly.
Methods defined with class "SpatialPolygons" in the signature:
signature(obj = "SpatialPolygons"): select subset of (sets of) polygons; NAs are not permitted in the row index
signature(x = "SpatialPolygons", y = "missing"):
plot polygons in SpatialPolygons object
signature(object = "SpatialPolygons"): summarize object
signature(object = "SpatialPolygons"): rbind-like method
rbind calls the function SpatialPolygons, where it is
checked that all IDs are unique. If rbind-ing SpatialPolygons without
unique IDs, it is possible to set the argument makeUniqueIDs = TRUE, although
it is preferred to change these explicitly with spChFIDs.
Roger Bivand
grd <- GridTopology(c(1,1), c(1,1), c(10,10)) polys <- as.SpatialPolygons.GridTopology(grd) plot(polys) #text(coordinates(polys), labels=sapply(slot(polys, "polygons"), function(i) slot(i, "ID")), cex=0.6) text(coordinates(polys), labels=row.names(polys))