> ## 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.

# ST_Rotate

Rotates a geometry by a specified angle in radians counter-clockwise around a given origin point. The origin for rotation can be specified as either a POINT geometry or x and y coordinates. If the origin is not specified, the geometry is rotated around POINT(0 0).

<img src="https://mintcdn.com/wherobots/wLm_IRUSNlHZTHJP/images/sql-functions/ST_Rotate/ST_Rotate.svg?fit=max&auto=format&n=wLm_IRUSNlHZTHJP&q=85&s=06a41706ec137529f70e447b93a15833" alt="ST_Rotate" width="400" height="180" data-path="images/sql-functions/ST_Rotate/ST_Rotate.svg" />

## Signatures

```sql theme={"system"}
ST_Rotate (geometry: Geometry, angle: Double)
```

```sql theme={"system"}
ST_Rotate (geometry: Geometry, angle: Double, originX: Double, originY: Double)
```

```sql theme={"system"}
ST_Rotate (geometry: Geometry, angle: Double, pointOrigin: Geometry)
```

## Parameters

<ParamField body="geometry" type="Geometry" required>
  The input geometry.
</ParamField>

<ParamField body="angle" type="Double" required>
  The angle value.
</ParamField>

<ParamField body="originX" type="Double">
  The origin x value.
</ParamField>

<ParamField body="originY" type="Double">
  The origin y value.
</ParamField>

<ParamField body="pointOrigin" type="Geometry">
  The point origin value.
</ParamField>

## Return type

<ResponseField type="Geometry">
  The resulting geometry.
</ResponseField>

## Example

```sql theme={"system"}
SELECT ST_Rotate(ST_GeomFromEWKT('SRID=4326;POLYGON ((0 0, 1 0, 1 1, 0 0))'), 10, 0, 0)
```

```
SRID=4326;POLYGON ((0 0, -0.8390715290764524 -0.5440211108893698, -0.2950504181870827 -1.383092639965822, 0 0))
```
