Aliases: sf_poly
Keywords:
### ** Examples m <- matrix(c(0,0,0,0,1,0,0,1,1,0,0,1,0,0,0), ncol = 3, byrow = TRUE, dimnames = list(NULL, c("x", "y", "z"))) m <- cbind(m, polygon_id = 1, linestring_id = 1) sf_poly( m )
polygon_id geometry 1 1 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0
df <- as.data.frame(m) sf_poly( df)
polygon_id geometry 1 1 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0
## order doesn't matter, only the names are used sf_poly(df[c(5, 3, 4, 1, 2)])
polygon_id geometry 1 1 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0