Learn R Programming

geospatialsuite (version 0.1.1)

get_region_boundary: Get region boundary for any specified region

Description

Universal function to get region boundaries for any geographic area including US states, countries, CONUS, counties, or custom bounding boxes with comprehensive error handling.

Usage

get_region_boundary(region_def, verbose = FALSE)

Value

sf object with boundary geometry

Arguments

region_def

Region definition in various formats:

  • Character: "Ohio", "Nigeria", "CONUS"

  • Character with colon: "Ohio:Franklin" (state:county)

  • Numeric vector: c(xmin, ymin, xmax, ymax) bounding box

  • sf object: existing spatial object

verbose

Print progress messages

Examples

Run this code
# \donttest{
# US State with error handling
ohio_boundary <- get_region_boundary("Ohio")

# Custom bounding box with validation
custom_area <- get_region_boundary(c(-84.5, 39.0, -82.0, 41.0))
# }

Run the code above in your browser using DataLab