> ## 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.

# GeoDataFrame.sjoin_nearest

> Join points to their nearest neighbors using Sedona KNN semantics.

Join points to their nearest neighbors using Sedona KNN semantics.

Supports inner joins, default suffixes, `exclusive=False`, an optional
positive `max_distance` result filter, and a new `distance_col`.
Ties follow `spark.sedona.join.knn.includeTieBreakers`; all GeoPandas
equidistant rows are not guaranteed. See
`sedona.spark.geopandas.sjoin_nearest` for the full restrictions.

## Signature

```python theme={"system"}
sjoin_nearest(
    right,
    how='inner',
    max_distance=None,
    lsuffix='left',
    rsuffix='right',
    distance_col=None,
    exclusive=False,
)
```

## Parameters

<ParamField path="right" required />

<ParamField path="how" default="'inner'" />

<ParamField path="max_distance" default="None" />

<ParamField path="lsuffix" default="'left'" />

<ParamField path="rsuffix" default="'right'" />

<ParamField path="distance_col" default="None" />

<ParamField path="exclusive" default="False" />


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