powered by
Expands geometries into a list of vectors of their components.
expand_geoms(x)
A list of rsgeo vectors containing each original geometry's components as a new vector.
rsgeo
an object of class rsgeo
rs_MULTIPOINT expands into a vector of points
rs_MULTIPOINT
rs_LINESTRING expands into a vector points
rs_LINESTRING
rs_MULTILINESTRING expands into a vector of linestrings
rs_MULTILINESTRING
rs_POLYGON expands into a vector of linestrings
rs_POLYGON
rs_MULTIPOLYGON expands into a vector of polygons
rs_MULTIPOLYGON
If you wish to have a single vector returned, pass the results into flatten_geoms().
flatten_geoms()
mpnts <- geom_multipoint(runif(10), runif(10), rep.int(1:5, 2)) expand_geoms(mpnts)
Run the code above in your browser using DataLab