rotate

fun rotate(geometry: Geometry, angle: Double, origin: Point? = null): Geometry

Rotates the geometry by the specified angle of rotation around the provided origin point. The angle of rotation is used in the form of the modulo of 360 degrees; for example rotating by 540 degrees is equivalent to rotating the geometry by 180 degrees. A positive value corresponds to a counterclockwise rotation.

The GeometryType of the returned geometry is the same as the input geometry, except for an input Envelope which returns a Polygon result.

If the origin Point has a different SpatialReference to that of the geometry parameter, the point will be reprojected before the geometry is rotated, using the default transformation.

Rotating a Point using the same location for the origin parameter returns a Point with the same values as the input.

Supports true curves.

Return

A new geometry constructed by rotating the input geometry by the specified angle of rotation around the provided origin point.

Since

200.2.0

See also

(Geometry, Double, Double)

(Geometry, Double, Double, Point)

GeometryEditor.rotateSelectedElement

(Double, Point)