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

> Returns True for all aligned geometries that overlap other, else False.

Returns True for all aligned geometries that overlap other, else False.

In the original Geopandas, Geometries overlap if they have more than one but not all
points in common, have the same dimension, and the intersection of the
interiors of the geometries has the same dimension as the geometries
themselves.

However, in Sedona, we return True in the case where the geometries points match.

Note: Sedona's behavior may also differ from Geopandas for GeometryCollections.

The operation works on a 1-to-1 row-wise manner.

## Signature

```python theme={"system"}
overlaps(other, align=None)
```

## Parameters

<ParamField path="other" type="GeoSeries or geometric object" required>
  The GeoSeries (elementwise) or geometric object to test if
  overlaps.
</ParamField>

<ParamField path="align" type="bool | None (default None)" default="None">
  If True, automatically aligns GeoSeries based on their indices. None defaults to True.
  If False, the order of elements is preserved.
</ParamField>

## Returns

<ResponseField name="return" type="Series(bool)" />

<Note>
  This method works in a row-wise manner. It does not check if an element
  of one GeoSeries `overlaps` *any* element of the other one.
</Note>

**See also**

* `GeoSeries.crosses`
* `GeoSeries.intersects`

## Examples

```python theme={"system"}
>>> from sedona.spark.geopandas import GeoSeries
>>> from shapely.geometry import Polygon, LineString, MultiPoint, Point
>>> s = GeoSeries(
...     [
...         Polygon([(0, 0), (2, 2), (0, 2)]),
...         Polygon([(0, 0), (2, 2), (0, 2)]),
...         LineString([(0, 0), (2, 2)]),
...         MultiPoint([(0, 0), (0, 1)]),
...     ],
... )
>>> s2 = GeoSeries(
...     [
...         Polygon([(0, 0), (2, 0), (0, 2)]),
...         LineString([(0, 1), (1, 1)]),
...         LineString([(1, 1), (3, 3)]),
...         Point(0, 1),
...     ],
... )
```

We can check if each geometry of GeoSeries overlaps a single
geometry:

```python theme={"system"}
>>> polygon = Polygon([(0, 0), (1, 0), (1, 1), (0, 1)])
>>> s.overlaps(polygon)
0     True
1     True
2    False
3    False
dtype: bool
```

We can also check two GeoSeries against each other, row by row.
The GeoSeries above have different indices. We align both GeoSeries
based on index values and compare elements with the same index.

```python theme={"system"}
>>> s.overlaps(s2)
0    False
1     True
2    False
3    False
4    False
dtype: bool
```

```python theme={"system"}
>>> s.overlaps(s2, align=False)
0     True
1    False
2     True
3    False
dtype: bool
```


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