adjust_bbox: Get bounding box buffered and adjusted to aspect ratio

View source: R/adjust_bbox.R

adjust_bboxR Documentation

Get bounding box buffered and adjusted to aspect ratio

Description

[Deprecated]

This function is deprecated because the functionality has been incorporated into the improved sfext::st_bbox_ext() function which uses a similar set of parameters.

Takes an area as an sf object or a bounding box and returns a bounding box that matches the provided aspect ratio and contains the area or bounding box provided.

Common aspect ratios include "1:1" (1), "4:6" (0.666), "8.5:11", "16:9" (1.777). The asp parameter supports both numeric values and character strings with ratios matching the format of "width:height".

Usage

adjust_bbox(
  area = NULL,
  bbox = NULL,
  dist = NULL,
  diag_ratio = NULL,
  asp = NULL,
  crs = NULL
)

Arguments

area

sf object to buffer and/or adjust.

bbox

bbox object to buffer and/or adjust. If an area is provided, any bbox is ignored.

dist

buffer distance in meters. Optional.

diag_ratio

ratio to set map extent based diagonal distance of area's bounding box. Ignored when dist is provided.

asp

Aspect ratio of width to height as a numeric value (e.g. 0.33) or character (e.g. "1:3").

crs

Coordinate reference system of bounding box to return

Details

Get bounding box buffered and adjusted to match aspect ratio

Value

Class bbox object


elipousson/mapbaltimore documentation built on Dec. 1, 2024, 1:22 p.m.