Learn R Programming

geodimension (version 2.0.0)

get_geometry: Get geometry

Description

Get the geometry of a layer, as it is interpreted to define a geolevel object.

Usage

get_geometry(layer)

Value

A string.

Arguments

layer

A sf object.

Details

It will only be valid if one of the three geometries is interpreted: point, line or polygon.

See Also

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

Examples

Run this code

layer_us_county <- get_level_layer(gd_us, "county")

geometry <- get_geometry(layer_us_county)

Run the code above in your browser using DataLab