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

Sets the orientation of polygon vertex orderings to follow the Right-Hand-Rule convention. The exterior ring will have a clockwise winding order, while any interior rings are oriented counter-clockwise. This ensures the area bounded by the polygon falls on the right-hand side relative to the ring directions. The function is an alias for [ST\_ForcePolygonCW](/reference/wherobots-db/geometry-data/editors/ST_ForcePolygonCW).

<img src="https://mintcdn.com/wherobots/fqh3gPDE0J25Lra_/images/sql-functions/ST_ForceRHR/ST_ForceRHR.svg?fit=max&auto=format&n=fqh3gPDE0J25Lra_&q=85&s=7d2d9157b9407faba270d61f759b93b3" alt="ST_ForceRHR" width="500" height="300" data-path="images/sql-functions/ST_ForceRHR/ST_ForceRHR.svg" />

## Signatures

```sql theme={"system"}
ST_ForceRHR(geom: Geometry)
```

## Parameters

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

## Return type

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

## Example

```sql theme={"system"}
SELECT ST_AsText(ST_ForceRHR(ST_GeomFromText('POLYGON ((20 35, 10 30, 10 10, 30 5, 45 20, 20 35),(30 20, 20 15, 20 25, 30 20))')))
```

```
POLYGON ((20 35, 45 20, 30 5, 10 10, 10 30, 20 35), (30 20, 20 25, 20 15, 30 20))
```
