sp (version 0.7-5)

rings: sets spatial coordinates to create spatial data, or retrieves spatial coordinates

Description

sets spatial coordinates to create spatial data, or retrieves spatial coordinates

Usage

rings(obj)
	rings(object) <- value

Arguments

obj
object of class "SpatialRingsDataFrame"
object
object of class "data.frame"
value
object of class "SpatialRings"

Value

  • rings returns the SpatiaRings of obj; rings<- promotes a data.frame to a SpatialRingsDataFrame object

Examples

Run this code
data(ncshp)
nc1 <- as.SpatialRings.Shapes(nc.shp$Shapes, as.character(nc.shp$att.data$FIPS))
df <- nc.shp$att.data
rings(df) <- nc1
class(df)

Run the code above in your browser using DataCamp Workspace