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

> Returns the 2-dimensional point on geom1 that is closest to geom2.

Returns the 2-dimensional point on geom1 that is closest to geom2.
This is the first point of the shortest line between the geometries.

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

## Signature

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

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

## Parameters

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

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

## Returns

<ResponseField name="return" type="Column">
  the 2-dimensional point on a that is closest to b.
</ResponseField>


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