View source: R/transformations.r
rotate.bb | R Documentation |
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.
rotate.bb(shp, theta)
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. |
Matrix
## Not run: data(NS_bioregion) bb.new <- rotate.bb(NS_bioregion, -pi/3) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.