Read a Vector Map for Correction
read_map.Rd
Reads a vector map (e.g., shapefile) that is intended to be corrected.
Details
This function reads the geospatial file using sf::st_read
. If the
file contains polygon geometries and does not already have an area column
named 'area_old', this function will calculate the area of each feature and
add it.
Examples
if (FALSE) { # \dontrun{
# First, create a demo shapefile
demo_files <- create_demo_data()
# Read the map that needs correction
map_to_correct <- read_map(shp_path = demo_files$shp_path)
# The output is now ready to be used in the `correct_map()` function
# after a model has been trained.
plot(sf::st_geometry(map_to_correct))
} # }