geos_unnest: Unnest nested geometries

Description Usage Arguments Value Examples

View source: R/geos-unnest.R

Description

Unnest nested geometries

Usage

1
geos_unnest(geom, keep_empty = FALSE, keep_multi = TRUE, max_depth = 1)

Arguments

geom

A GEOS geometry vector

keep_empty

If TRUE, a GEOMETRYCOLLECTION EMPTY is left as-is rather than collapsing to length 0.

keep_multi

If TRUE, MULTI* geometries are not expanded to sub-features.

max_depth

The maximum recursive GEOMETRYCOLLECTION depth to unnest.

Value

A GEOS geometry vector with a length greater than or equal to geom with an attribute "lengths" that can be used to map elements of the result to the original item.

Examples

1
geos_unnest("GEOMETRYCOLLECTION (POINT (1 2), POINT (3 4))")

geos documentation built on Jan. 13, 2021, 8:13 a.m.