expand_bbox: Extract and optionally expand a bounding box

View source: R/mapping.r

expand_bboxR Documentation

Extract and optionally expand a bounding box

Description

Extract the bounding box from an object and optionally expand it. This can take an sf or a tibble with lat and lon columns.

Usage

expand_bbox(.data, exp_factor = 0.1, lon = "lon", lat = "lat", crs = 7844L)

Arguments

.data

(tibble) a tibble or sf

exp_factor

(numeric; default = 0.1) the expansion factor

lon

(character [optional]; default = 'lon') name of longitude column if a data.frame

lat

(character [optional]; default = 'lat') name of latitude column if a data.frame

crs

(numeric [optional]; default = 7844) CRS if converting data.frame to sf

Value

A named bounding box vector with names "left", "bottom", "right" and "top".


baslat/sak documentation built on April 14, 2025, 4:14 p.m.