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

> Return geometries with a consistent polygon ring orientation.

Return geometries with a consistent polygon ring orientation.

By default, polygon exterior rings are oriented counter-clockwise and
interior rings clockwise. Set `exterior_cw=True` to use the opposite
orientation. Polygonal members of GeometryCollections are processed
recursively, while non-polygonal members are left unchanged.

## Signature

```python theme={"system"}
orient_polygons(*, exterior_cw=False)
```

## Parameters

<ParamField path="exterior_cw" type="bool" default="False">
  If `True`, orient exterior rings clockwise and interior rings
  counter-clockwise.
</ParamField>

## Returns

<ResponseField name="return" type="GeoSeries" />

## Examples

```python theme={"system"}
>>> from sedona.spark.geopandas import GeoSeries
>>> from shapely.geometry import Polygon
>>> s = GeoSeries(
...     [Polygon([(0, 0), (0, 1), (1, 0), (0, 0)])]
... )
>>> s.orient_polygons()
0    POLYGON ((0 0, 1 0, 0 1, 0 0))
dtype: object
```


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