library(sf)
sf <- st_sf(a = c("x", "y"), geom = st_sfc(st_point(3:4), st_point(3:4)))
sf[["geom2"]] = st_sfc(st_point(3:4), st_point(3:4))
sf
Simple feature collection with 2 features and 1 field
Active geometry column: geom
geometry type: POINT
dimension: XY
bbox: xmin: 3 ymin: 4 xmax: 3 ymax: 4
epsg (SRID): NA
proj4string: NA
a geom geom2
1 x POINT (3 4) POINT (3 4)
2 y POINT (3 4) POINT (3 4)
should encode.sf apply to multiple columns?
sfGeometryColumn.sf <- function(sf) names( which( sapply( sf, function(x) inherits(x, "sfc") ) ) )
should encode.sf apply to multiple columns?