Learn R Programming

geodimension (version 1.0.0)

complete_point_geometry: Complete point geometry

Description

In case of having the polygon geometry defined, it obtains the point geometry from it.

Usage

complete_point_geometry(gl, use_intermediate_projected_crs = FALSE)

# S3 method for geolevel complete_point_geometry(gl, use_intermediate_projected_crs = FALSE)

Value

A geolevel object.

Arguments

gl

A geolevel object.

use_intermediate_projected_crs

A boolean.

Details

If the point geometry was already defined, if there are instances with this geometry empty, it completes them.

If the geometry of the CRS is not projected, it warns that the calculations may not be correct. A projected intermediate geometry can be used to perform the operation, indicating it by the boolean parameter.

See Also

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

Examples

Run this code
library(tidyr)
library(sf)

state <-
  geolevel(name = "state",
           layer = layer_us_state,
           key = c("geoid")) %>%
  complete_point_geometry()

Run the code above in your browser using DataLab