Learn R Programming

geodimension (version 1.0.0)

geolevel: geolevel S3 class

Description

A geolevel object is created from a given geographic layer. The attributes of the layer to be included in the level can be indicated, and the subset of these that make up the natural key. If no attribute is indicated, all are considered. In any case, the attributes that make up the key must be indicated.

Usage

geolevel(name = NULL, layer = NULL, attributes = NULL, key = NULL)

Value

A geolevel object.

Arguments

name

A string, level name.

layer

A sf object.

attributes

A vector, selected attributes.

key

A vector, attributes that compose the key.

Details

A level can have several associated geometries (point, polygon or line). The geometry is obtained from the layer data.

The name of the level is used later to reference it and relate it to other levels.

See Also

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

Examples

Run this code
library(sf)

region <-
  geolevel(name = "region",
           layer = layer_us_region,
           key = c("geoid"))

Run the code above in your browser using DataLab