powered by
Extract simple geometries
wk_flatten(handleable, ..., max_depth = 1)wk_flatten_filter(handler, max_depth = 1L, add_details = FALSE)
wk_flatten_filter(handler, max_depth = 1L, add_details = FALSE)
handleable transformed such that collections have been expanded and only simple geometries (point, linestring, polygon) remain.
handleable
A geometry vector (e.g., wkb(), wkt(), xy(), rct(), or sf::st_sfc()) for which wk_handle() is defined.
wkb()
wkt()
xy()
rct()
sf::st_sfc()
wk_handle()
Passed to the wk_handle() method.
The maximum (outer) depth to remove.
A wk_handler object.
Use TRUE to add a "wk_details" attribute, which contains columns feature_id, part_id, and ring_id.
TRUE
feature_id
part_id
ring_id
wk_flatten(wkt("MULTIPOINT (1 1, 2 2, 3 3)")) wk_flatten( wkt("GEOMETRYCOLLECTION (GEOMETRYCOLLECTION (GEOMETRYCOLLECTION (POINT (0 1))))"), max_depth = 2 )
Run the code above in your browser using DataLab