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

> Cover Geometry with S2 Cells and return a List of Long type cell IDs :param geometry: Geometry column to generate cell IDs :type geometry: ColumnOrName :param level: value between 1 and 31,...

Cover Geometry with S2 Cells and return a List of Long type cell IDs

SQL reference: [`ST_S2CellIDs`](/reference/wherobots-db/geometry-data/spatial-indexing/ST_S2CellIDs)

## Signature

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

ST_S2CellIDs(geometry: ColumnOrName, level: Union[ColumnOrName, int]) -> Column
```

## Parameters

<ParamField path="geometry" type="ColumnOrName" required>
  Geometry column to generate cell IDs
</ParamField>

<ParamField path="level" type="Union[ColumnOrName, int]" required>
  value between 1 and 31, controls the size of the cells used for coverage. With a bigger level, the cells will be smaller, the coverage will be more accurate, but the result size will be exponentially increasing.
</ParamField>

## Returns

<ResponseField name="return" type="List[long]">
  List of cellIDs
</ResponseField>


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