Skip to content

Commit

Permalink
fix #2183
Browse files Browse the repository at this point in the history
  • Loading branch information
edzer committed Jul 14, 2023
1 parent 856ea7d commit 2c9e349
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion R/cast_sfc.R
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,6 @@ st_cast.sfc = function(x, to, ..., ids = seq_along(x), group_or_split = TRUE) {
#' @details the \code{st_cast} method for \code{sf} objects can only split geometries, e.g. cast \code{MULTIPOINT} into multiple \code{POINT} features. In case of splitting, attributes are repeated and a warning is issued when non-constant attributes are assigned to sub-geometries. To merge feature geometries and attribute values, use \link[sf:aggregate.sf]{aggregate} or \link[sf:tidyverse]{summarise}.
st_cast.sf = function(x, to, ..., warn = TRUE, do_split = TRUE) {
geom = st_cast(st_geometry(x), to, group_or_split = do_split)
crs = st_crs(x)
agr = st_agr(x)
all_const = all_constant(x)
sf_column = attr(x, "sf_column") # keep name
Expand Down

0 comments on commit 2c9e349

Please sign in to comment.