bbox: Calculate Bounding Box

View source: R/bbox.R

bboxR Documentation

Calculate Bounding Box

Description

Functions to calculate bounding box of an object.

Usage

bbox(x, ...)

## Default S3 method:
bbox(x, y, ...)

## S3 method for class 'polygon'
bbox(p, ...)

Methods (by class)

  • bbox(default): Calculate the bounding box coordinates for a set of coordinate points.

  • bbox(polygon): Calculate surface area of a polygon using its vertex coordinates.

Examples

x <- c(0, 0, 0.5, 1, 1, 0)
y <- c(0, 1, 0.5, 1, 0, 0)
bbox(x, y) # Calculate area of polygon.


TobieSurette/gulf.graphics documentation built on Feb. 10, 2024, 10:58 p.m.