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

> Generate the GeoJSON style representation of a geometry column.

Generate the GeoJSON style representation of a geometry column.

SQL reference: [`ST_AsGeoJSON`](/reference/wherobots-db/geometry-data/output/ST_AsGeoJSON)

## Signature

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

ST_AsGeoJSON(
    geometry: ColumnOrName,
    type: Optional[Union[ColumnOrName, str]] = None,
) -> Column
```

## Parameters

<ParamField path="geometry" type="ColumnOrName" required>
  Geometry column to generate GeoJSON for.
</ParamField>

<ParamField path="type" type="Optional[Union[ColumnOrName, str]]" default="None" />

## Returns

<ResponseField name="return" type="Column">
  GeoJSON representation of geometry as a string column.
</ResponseField>


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