> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wherobots.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GeoDataFrame.rotate

> Return a GeoSeries with rotated geometries.

Return a `GeoSeries` with rotated geometries.

See [http://shapely.readthedocs.io/en/latest/manual.html#shapely.affinity.rotate](http://shapely.readthedocs.io/en/latest/manual.html#shapely.affinity.rotate)
for details.

## Signature

```python theme={"system"}
rotate(angle, origin='center', use_radians=False)
```

## Parameters

<ParamField path="angle" type="float" required>
  The angle of rotation can be specified in either degrees (default)
  or radians by setting use\_radians=True. Positive angles are
  counter-clockwise and negative are clockwise rotations.
</ParamField>

<ParamField path="origin" type="string, Point, or tuple (x, y)" default="'center'">
  The point of origin can be a keyword 'center' for the bounding box
  center (default), 'centroid' for the geometry's centroid, a Point
  object or a coordinate tuple (x, y).
</ParamField>

<ParamField path="use_radians" type="boolean" default="False">
  Whether to interpret the angle of rotation as degrees or radians
</ParamField>

## Examples

```python theme={"system"}
>>> from shapely.geometry import Point, LineString, Polygon
>>> from sedona.spark.geopandas import GeoSeries
>>> s = GeoSeries(
...     [
...         Point(1, 1),
...         LineString([(1, -1), (1, 0)]),
...         Polygon([(3, -1), (4, 0), (3, 1)]),
...     ]
... )
>>> s
0                         POINT (1 1)
1              LINESTRING (1 -1, 1 0)
2    POLYGON ((3 -1, 4 0, 3 1, 3 -1))
dtype: geometry
```

```python theme={"system"}
>>> s.rotate(90)
0                                          POINT (1 1)
1                      LINESTRING (1.5 -0.5, 0.5 -0.5)
2    POLYGON ((4.5 -0.5, 3.5 0.5, 2.5 -0.5, 4.5 -0.5))
dtype: geometry
```

```python theme={"system"}
>>> s.rotate(90, origin=(0, 0))
0                       POINT (-1 1)
1              LINESTRING (1 1, 0 1)
2    POLYGON ((1 3, 0 4, -1 3, 1 3))
dtype: geometry
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.