expand_geoms: Expand Geometries

View source: R/extendr-wrappers.R

expand_geomsR Documentation

Expand Geometries

Description

Expands geometries into a list of vectors of their components.

Usage

expand_geoms(x)

Arguments

x

an object of class rsgeo

Details

  • rs_MULTIPOINT expands into a vector of points

  • rs_LINESTRING expands into a vector points

  • rs_MULTILINESTRING expands into a vector of linestrings

  • rs_POLYGON expands into a vector of linestrings

  • rs_MULTIPOLYGON expands into a vector of polygons

If you wish to have a single vector returned, pass the results into flatten_geoms().

Value

A list of rsgeo vectors containing each original geometry's components as a new vector.

Examples

mpnts <- geom_multipoint(runif(10), runif(10), rep.int(1:5, 2))
expand_geoms(mpnts)

rsgeo documentation built on Sept. 9, 2023, 1:07 a.m.