Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

constructor-SpatialRings

create SpatialRings or SpatialRingsDataFrame


Description

create objects of class SpatialRings or SpatialRingsDataFrame

Usage

Ring(coords,ID=as.character(NA))
SpatialRings(RingList, proj4string=CRS(as.character(NA)))
SpatialRingsDataFrame(sr, data, match.ID = TRUE)

Arguments

coords

2-column numeric matrix with coordinates; first point (row) should equal last coordinates (row); if the hole argument is not given, the status of the polygon as a hole or an island will be taken from the ring direction, with clockwise meaning island, and counter-clockwise meaning hole

ID

character vector of length one with identifier

RingList

list with objects of class Ring-class

proj4string

Object of class "CRS" holding a valid proj4 string

sr

object of class SpatialRings-class

data

object of class data.frame; the number of rows in data should equal the number of Lines elements in sl

match.ID

logical: (default TRUE): match SpatialLines member Lines ID slot values with data frame row names, and re-order the data frame rows if necessary

Value

Ring returns object of class Ring SpatialRings returns object of class SpatialRings SpatialRingsDataFrame returns object of class SpatialRingsDataFrame

See Also


rgeos

Interface to Geometry Engine - Open Source ('GEOS')

v0.5-5
GPL (>= 2)
Authors
Roger Bivand [cre, aut] (<https://orcid.org/0000-0003-2392-6140>), Colin Rundel [aut], Edzer Pebesma [ctb], Rainer Stuetz [ctb], Karl Ove Hufthammer [ctb], Patrick Giraudoux [ctb], Martin Davis [cph, ctb], Sandro Santilli [cph, ctb]
Initial release
2020-09-01

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.