Learn R Programming

rolap (version 2.5.1)

get_geoattribute_geometries: Get geoattribute geometries

Description

For each geoattribute, get its geometries.

Usage

get_geoattribute_geometries(db, dimension, attribute)

# S3 method for star_database get_geoattribute_geometries(db, dimension = NULL, attribute = NULL)

Value

A vector of strings.

Arguments

db

A star_database object.

dimension

A string, dimension name.

attribute

A vector, attribute names.

Details

If the name of the dimension is not indicated, it is considered the first one that has geoattributes defined.

See Also

Other star database geographic attributes: check_geoattribute_geometry(), define_geoattribute(), get_geoattributes(), get_layer_geometry(), get_point_geometry(), summarize_layer()

Examples

Run this code

db <- mrs_db |>
  define_geoattribute(
    dimension = "where",
    attribute = "state",
    from_layer = us_layer_state,
    by = "STUSPS"
  )

geometries <- db |>
  get_geoattribute_geometries(
    dimension = "where",
    attribute = "state"
  )

Run the code above in your browser using DataLab