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

> Calculate the haversine/great-circle distance between two geometry columns using a given radius.

Calculate the haversine/great-circle distance between two geometry columns using a given radius.

SQL reference: [`ST_DistanceSphere`](/reference/wherobots-db/geometry-data/measurement/ST_DistanceSphere)

## Signature

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

ST_DistanceSphere(
    a: ColumnOrName,
    b: ColumnOrName,
    radius: Optional[Union[ColumnOrName, float]] = 6371008.0,
) -> Column
```

## Parameters

<ParamField path="a" type="ColumnOrName" required>
  Geometry column to use in the calculation.
</ParamField>

<ParamField path="b" type="ColumnOrName" required>
  Other geometry column to use in the calculation.
</ParamField>

<ParamField path="radius" type="Optional[Union[ColumnOrName, float]]" default="6371008.0">
  Radius of the sphere, defaults to 6371008.0
</ParamField>

## Returns

<ResponseField name="return" type="Column">
  Two-dimensional haversine/great-circle distance between a and b as a double column. Unit is meter.
</ResponseField>


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