> ## 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_MakePolygon (Python)

> Create a polygon geometry from a linestring describing the exterior ring as well as an array of linestrings describing holes.

Create a polygon geometry from a linestring describing the exterior ring as well as an array of linestrings describing holes.

SQL reference: [`ST_MakePolygon`](/reference/wherobots-db/geometry-data/editors/ST_MakePolygon)

## Signature

```python theme={"system"}
from sedona.spark.sql.st_functions import ST_MakePolygon

ST_MakePolygon(
    line_string: ColumnOrName,
    holes: Optional[ColumnOrName] = None,
) -> Column
```

## Parameters

<ParamField path="line_string" type="ColumnOrName" required>
  Closed linestring geometry column that describes the exterior ring of the polygon.
</ParamField>

<ParamField path="holes" type="Optional[ColumnOrName]" default="None">
  Optional column for an array of closed geometry columns that describe holes in the polygon, defaults to None.
</ParamField>

## Returns

<ResponseField name="return" type="Column">
  Polygon geometry column created from the input linestrings.
</ResponseField>


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