This function rotates the features of an input spatial object by the specified rotation angle and rotation base.
Arguments
- 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.
Examples
# 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")