Inverse of as_polygon_atlas(). Sets the single geom slot to an sf-class
geometry table, converting from polygons via sfheaders::sf_multipolygon()
if needed — sfheaders is pure Rcpp with no GDAL/GEOS/PROJ dependencies, so
the conversion itself does not require a full sf installation. Use this when
you want to run sf operations (buffers, intersections, CRS transforms) on
atlas geometry; those sf operations themselves still require sf.
Details
Conversion is lossless, so a single representation is kept (no redundant polygons alongside sf).
Examples
if (FALSE) { # \dontrun{
library(sf)
atlas <- as_sf_atlas(as_polygon_atlas(dk()))
st_buffer(atlas_geom(atlas)$geometry[[1]], dist = 2)
} # }
