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

> Return the shortest line between two geometries.

Return the shortest line between two geometries.

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

## Signature

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

ST_ShortestLine(a: ColumnOrName, b: ColumnOrName) -> Column
```

## Parameters

<ParamField path="a" type="ColumnOrName" required>
  One geometry column.
</ParamField>

<ParamField path="b" type="ColumnOrName" required>
  Other geometry column.
</ParamField>

## Returns

<ResponseField name="return" type="Column">
  Shortest LineString connecting the two geometries as a geometry column.
</ResponseField>


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