st_multi.Rd
Returns the geometry as a MULTI*
geometry. If the geometry is already a MULTI*
, it is returned unchanged.
st_multi(.geom, ...)
.geom | A geometry or a set of geometries of class |
---|---|
... | Unused. |
a single MULTI*
geometry.
Other make: st_makeline
,
st_makepoint
, st_numpoints
library(tibble) library(dplyr) tibble(g = c("a", "a"), point = c(st_point(12, 21), st_point(21, 12))) %>% group_by(g) %>% summarise(multi = st_multi(point))#> # A tibble: 1 x 2 #> g multi #> <chr> <MULTIPOINT> #> 1 a ((12 21), (21 12))