We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e91f5e3 commit 4b5ebafCopy full SHA for 4b5ebaf
R/sfc.R
@@ -43,6 +43,8 @@ st_sfc = function(..., crs = NA_crs_, precision = 0.0, check_ring_dir = FALSE, d
43
# if we have only one arg, which is already a list with sfg's, but NOT a geometrycollection:
44
# (this is the old form of calling st_sfc; it is way faster to call st_sfc(lst) if lst
45
# already contains a zillion sfg objects, than do.call(st_sfc, lst) ...
46
+ if (length(lst) && inherits(lst[[1]], "sf"))
47
+ stop("use st_as_sfc() to extract geometries from an sf object")
48
if (length(lst) == 1 && is.list(lst[[1]]) && !inherits(lst[[1]], "sfg")
49
&& (length(lst[[1]]) == 0 || inherits(lst[[1]][[1]], "sfg") || is.null(lst[[1]][[1]])))
50
lst = lst[[1]]
0 commit comments