Skip to contents

The rotate_shape() function takes a one-row special feature object and rotates the geometry about the centroid or a specified point.

Usage

rotate_shape(shape, angle_degrees, center = NULL)

Arguments

shape

a polygon you want to rotate. Must be a special feature object with only one row.

angle_degrees

The angle (in degrees) that you want to rotate the shape

center

The center about which to rotate in the form of XY coordinates. Default is null, When NULL, rotation is about the centroid.

Value

Returns the simple feature shape object with rotated geometry