calc_default_bbox: Calculate Default Bounding Box

View source: R/func_mapmixture.R

calc_default_bboxR Documentation

Calculate Default Bounding Box

Description

Internal function to calculate a default bounding box for a set of longitude and latitude coordinates.

Usage

calc_default_bbox(data, expand = NULL)

Arguments

data

data.frame or tibble containing three columns. 1st column is a character vector of site names. 2nd column is a numeric vector of latitude values. 3rd column is a numeric vector of longitude values.

expand

numeric value indicating how much % to increase the coordinates limits.

Value

A bbox object.

Examples

coords <- data.frame(
  site = c("Site1","Site2","Site3"),
  lat = c(40.0, 50.5, 60.5),
  lon = c(-1.0, 5.0, 10.5)
)
calc_default_bbox(coords, expand = NULL)
calc_default_bbox(coords, expand = 0.10)

mapmixture documentation built on April 3, 2025, 7:45 p.m.