atlas_geom: Get the raw 2D geometry of an atlas

View source: R/atlas_accessors.R

atlas_geomR Documentation

Get the raw 2D geometry of an atlas

Description

Returns the single 2D geometry object stored in atlas$data$geom, which is either an sf-class data frame or a brain_polygons data.frame. Its class determines which rendering path is used downstream.

Usage

atlas_geom(atlas)

Arguments

atlas

a ggseg_atlas object

Details

For backward compatibility with released atlases built before the unified geom slot, this falls back to the legacy sf slot. Reverse dependencies should call this accessor (or atlas_sf() / atlas_polygons()) rather than reaching into atlas$data directly.

Value

an sf or brain_polygons object, or NULL if the atlas has no 2D geometry

Examples

g <- atlas_geom(dk())
atlas_geometry_type(dk())

ggseg.formats documentation built on July 2, 2026, 5:07 p.m.