calc_default_bbox {mapmixture}R 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)

[Package mapmixture version 1.2.0 Index]