Skip to contents

Get unrelated instances of a geoattribute for a geometry.

Usage

check_geoattribute_geometry(db, dimension, attribute, geometry)

# S3 method for star_database
check_geoattribute_geometry(
  db,
  dimension = NULL,
  attribute = NULL,
  geometry = "polygon"
)

Arguments

db

A star_database object.

dimension

A string, dimension name.

attribute

A vector, attribute names.

geometry

A string, geometry name ('point' or 'polygon').

Value

A tibble.

Details

We obtain the values of the dimension attribute that do not have an associated geographic element of the indicated geometry.

If there is only one geoattribute defined, neither the dimension nor the attribute must be indicated.

See also

Examples


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

instances <- check_geoattribute_geometry(db,
                                         dimension = "where",
                                         attribute = "state")