View source: R/rotate_features.R
rotate_features | R Documentation |
This function rotates the features of an input spatial object by the specified rotation angle and rotation base.
rotate_features(input_sf, rotation_angle = NULL, rotation_base = "center")
input_sf |
The input spatial object to be rotated. It can be an 'sf' object or a 'Spatial' object. |
rotation_angle |
The angle of rotation in degrees. |
rotation_base |
The rotation base. It can be "center" or a coordinate specifying the rotation base. |
A list containing the rotation base and the rotated features as an 'sf' object.
# Load sample data
data(landcover)
# Rotate the landcover data by 45 degrees around the center
rot_coords <- rotate_features(input_sf = landcover, rotation_angle = 45, rotation_base = "center")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.