make_bbox function

Compute a bounding box

Compute a bounding box

Compute a bounding box for a given longitude / latitude collection.

make_bbox(lon, lat, data, f = 0.05)

Arguments

  • lon: longitude
  • lat: latitude
  • data: (optional) a data frame containing lon and lat as variables
  • f: number specifying the fraction by which the range should be extended. if length 2 vector, applies to longitude and then latitude.

Examples

make_bbox(lon, lat, data = crime) make_bbox(lon, lat, data = crime, f = .20) make_bbox(lon, lat, data = crime, f = c(.20, .05)) (lon <- sample(crime$lon, 10)) (lat <- sample(crime$lat, 10)) make_bbox(lon, lat) make_bbox(lon, lat, f = .10) # bigger box
  • Maintainer: David Kahle
  • License: GPL-2
  • Last published: 2023-11-19