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

> Assign a connected component id to each geometry based on the ST_Crosses predicate.

Assign a connected component id to each geometry based on the ST\_Crosses predicate.

Two geometries are in the same component if they are connected through any chain
of geometries that cross each other.

SQL reference: [`ST_CrossesCC`](/reference/wherobots-db/geometry-data/predicates/ST_CrossesCC)

## Signature

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

ST_CrossesCC(
    geometry: ColumnOrName,
    partition_by: Optional[ColumnOrName] = None,
) -> Column
```

## Parameters

<ParamField path="geometry" type="ColumnOrName" required>
  Geometry column or name.
</ParamField>

<ParamField path="partition_by" type="Optional[ColumnOrName]" default="None">
  Optional column to partition by before computing components.
</ParamField>

## Returns

<ResponseField name="return" type="Column">
  A long indicating the connected component id.
</ResponseField>


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