View source: R/atlas_polygons.R
| sf_to_polygons | R Documentation |
Extracts coordinates from an sf-backed atlas geometry table and returns a
nested data.frame keyed by label. Each row carries a geometry list-column
containing the per-view, per-ring point coordinates needed to render with
graphics::polypath() (using the subgroup ring index for holes).
sf_to_polygons(sf_data)
sf_data |
An sf-class data.frame with columns |
A data.frame with one row per label and a geometry list-column.
Each nested element is a data.frame with columns view, x, y,
group (disjoint polygon piece within a label/view), subgroup
(ring within a piece; first = exterior, rest = holes).
Internal conversion primitive. For the atlas-level public API use
as_polygon_atlas() / atlas_polygons().
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.