SpatialPolygons

0th

Percentile

create objects of class SpatialPolygons or SpatialPolygonsDataFrame

create objects of class SpatialPolygons or SpatialPolygonsDataFrame from lists of Polygons objects and data.frames

Keywords
manip
Usage
Polygon(coords, hole=as.logical(NA))
Polygons(srl, ID)
SpatialPolygons(Srl, pO = 1:length(Srl), proj4string=CRS(as.character(NA)))
SpatialPolygonsDataFrame(Sr, data, match.ID = TRUE)
Arguments
coords
2-column numeric matrix with coordinates; first point (row) should equal last coordinates (row)
proj4string
projection string of class CRS-class
hole
logical value for setting polygon as hole or not
srl
list with Polygon-class objects
ID
character vector of length one with identifier
Srl
list with objects of class Polygons-class
pO
integer vector; plotting order
Sr
object of class SpatialPolygons-class
data
object of class data.frame; the number of rows in data should equal the number of Polygons-class objects in Sr
match.ID
logical: (default TRUE): match SpatialPolygons member Polygons ID slot values with data frame row names, and re-order the data frame rows if necessary
Value

  • Polygon returns an object of class Polygon; Polygons returns an object of class Polygons; SpatialPolygons returns object of class SpatialPolygons; SpatialPolygonsDataFrame returns object of class SpatialPolygonsDataFrame

See Also

SpatialPolygons-class, SpatialPolygonsDataFrame-class

Aliases
  • SpatialPolygons
  • SpatialPolygonsDataFrame
  • Polygon
  • Polygons
Documentation reproduced from package sp, version 0.8-1, License: GPL version 2 or later

Community examples

Looks like there are no examples yet.