rotate.bb: Rotate Bounding box by theta radians

View source: R/transformations.r

rotate.bbR Documentation

Rotate Bounding box by theta radians

Description

Given some shp defined as the boundary of interest, rotate it around the centroid and return the rotation and the centroid as attributes. This is used for defining a Master Sample bounding box that has random rotation while ensuring that the new rotated bounding box fits the shp.

Usage

rotate.bb(shp, theta)

Arguments

shp

A spatial file with the spatial boundary of the sample.

theta

Radians of rotation. Positive to the right of pi/2, negative to the left.

Value

Matrix

Examples

## Not run: 
data(NS_bioregion)
bb.new <- rotate.bb(NS_bioregion, -pi/3)

## End(Not run)

paul-vdb/DFO-master-sample documentation built on April 5, 2022, 4:35 p.m.