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

> Spatial join of two GeoDataFrames.

Spatial join of two GeoDataFrames.

## Signature

```python theme={"system"}
sjoin(
    other,
    how='inner',
    predicate='intersects',
    lsuffix='left',
    rsuffix='right',
    distance=None,
    on_attribute=None,
    **kwargs,
)
```

## Parameters

<ParamField path="other" type="GeoDataFrame" required>
  The right GeoDataFrame to join with.
</ParamField>

<ParamField path="how" type="str" default="'inner'">
  The type of join:

  * 'left': use keys from left\_df; retain only left\_df geometry column
  * 'right': use keys from right\_df; retain only right\_df geometry column
  * 'inner': use intersection of keys from both dfs; retain only left\_df geometry column
</ParamField>

<ParamField path="predicate" type="str" default="'intersects'">
  Binary predicate. Valid values: 'intersects', 'contains', 'within', 'dwithin', 'touches', 'crosses', 'overlaps', 'covers', 'covered\_by'
</ParamField>

<ParamField path="lsuffix" type="str" default="'left'">
  Suffix to apply to overlapping column names (left GeoDataFrame).
</ParamField>

<ParamField path="rsuffix" type="str" default="'right'">
  Suffix to apply to overlapping column names (right GeoDataFrame).
</ParamField>

<ParamField path="distance" type="float" default="None">
  Distance for 'dwithin' predicate. Required if predicate='dwithin'.
</ParamField>

<ParamField path="on_attribute" type="(str, list or tuple)" default="None">
  Column name(s) to join on as an additional join restriction.
  These must be found in both DataFrames.
</ParamField>

<ParamField path="kwargs">
  Additional keyword arguments passed to the spatial join function.
</ParamField>

## Returns

<ResponseField name="return" type="GeoDataFrame">
  A GeoDataFrame with the results of the spatial join.
</ResponseField>

## Examples

```python theme={"system"}
>>> from shapely.geometry import Point, Polygon
>>> from sedona.spark.geopandas import GeoDataFrame
```

```python theme={"system"}
>>> polygons = GeoDataFrame({
...     'geometry': [Polygon([(0, 0), (0, 1), (1, 1), (1, 0)])],
...     'value': [1]
... })
>>> points = GeoDataFrame({
...     'geometry': [Point(0.5, 0.5), Point(2, 2)],
...     'value': [1, 2]
... })
>>> joined = points.sjoin(polygons)
>>> joined
    geometry_left  value_left            geometry_right  value_right
0  POINT (0.5 0.5)           1  POLYGON ((0 0, 0 1, 1 1, 1 0, 0 0))            1
```


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