Skip to contents

Converts MGRS coordinates to a single sf bounding box in a suitable projected CRS, handling data that spans multiple UTM zones.

Usage

mgrs_to_latlong_bbox(df)

Arguments

df

A data frame with at least three columns: cellCode (containing MGRS strings), and xcoord and ycoord for easting and northing.

Value

An sf bounding box (sf::st_bbox) in a single projected CRS (e.g., Albers).

Examples

if (FALSE) { # \dontrun{
df <- data.frame(
  cellCode = c("32UUC", "32UUD"),
  xcoord = c(500000, 501000),
  ycoord = c(5600000, 5601000)
)
bbox <- mgrs_to_latlong_bbox(df)
} # }