Learn R Programming

sf (version 0.3-4)

sfc: Create simple feature collection object of class sfc from list

Description

Create simple feature list column, set class, and add coordinate reference system

Usage

st_sfc(..., crs = NA_crs_, precision = 0)

Arguments

...
one or more simple feature geometries
crs
coordinate reference system: integer with the epsg code, or character with proj4string
precision
numeric; see st_as_binary

Details

a simple feature collection object is a list of class c("stc_TYPE", "sfc") which contains objects of identical type. This function creates such an object from a list of simple feature geometries (of class sfg).

Examples

Run this code
pt1 = st_point(c(0,1))
pt2 = st_point(c(1,1))
(sfc = st_sfc(pt1, pt2))
d = data.frame(a = 1:2)

Run the code above in your browser using DataLab