Learn R Programming

swaRmverse (version 0.1.0)

calc_obb: Minimum Bounding Box

Description

This function calculates the minimum bounding box of a group of objects

Usage

calc_obb(x, y, geo = FALSE)

Value

A list with the bounding box coordinates, its height, width, and the orientation of the longest side in degrees.

Arguments

x

A vector of x (or longitude) coordinates.

y

A vector of y (or latitude) coordinates.

geo

A logical value indicating whether the locations are defined by geographic coordinates (pairs of longitude/latitude values). Default: FALSE.

Author

Marina Papadopoulou, m.papadopoulou.rug@gmail.com