get_empty_geometry_instances {geodimension}R Documentation

Get empty geometry instances

Description

Get the instances of the data table that do not have associated geometry for the specified geometry type.

Usage

get_empty_geometry_instances(gl, geometry)

## S3 method for class 'geolevel'
get_empty_geometry_instances(gl, geometry = NULL)

Arguments

gl

A geolevel object.

geometry

A string, type of geometry of the layer.

Value

A tibble.

See Also

geodimension, relate_levels

Other geolevel definition functions: add_geometry(), check_key(), complete_point_geometry(), coordinates_to_geometry(), geolevel(), get_geometry()

Examples


layer_us_state <-
  dplyr::inner_join(
    get_level_data_geo(gd_us, "state"),
    get_level_layer(gd_us, "state"),
    by = c("statefp", "division", "region", "stusps", "name")
  ) |>
  sf::st_as_sf()

us_state_point <-
  coordinates_to_geometry(layer_us_state,
                          lon_lat = c("intptlon", "intptlat"))

state <-
  geolevel(name = "state",
           layer = layer_us_state,
           key = "statefp",
           snake_case = TRUE) |>
  add_geometry(layer = us_state_point)

empty_geometry_instances <- state |>
  get_empty_geometry_instances(geometry = "point")


[Package geodimension version 2.0.0 Index]