rotate.shp: Rotate a polygon around the centroid of a Master Sample...

View source: R/transformations.r

rotate.shpR Documentation

Rotate a polygon around the centroid of a Master Sample bounding box.

Description

Given some polygon within the bounding box of a Master Sample rotate it by theta defined by that bounding box either backwards or forwards.

Usage

rotate.shp(shp, bb, back = TRUE)

Arguments

shp

Any polygon within the sample frame defined as a spatial features object.

bb

Special shape file defining the bounding box with attributes for centroid and rotation.

back

Boolean for whether or not the rotation is back to the original rotated bounding box.

Value

rotated sf spatial object.

Examples

## Not run: 
data(NS_bioregion)
bb <- getBB()
pts.shp <- rotate.shp(shp = NS_bioregion, bb = bb)

## End(Not run)

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