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

> Returns a spatial index for the GeoSeries.

Returns a spatial index for the GeoSeries.

Note that the spatial index may not be fully
initialized until the first use.

Currently, sindex is not retained when calling this method from a GeoDataFrame.
You can workaround this by first extracting the active geometry column as a GeoSeries,
and calling this method.

## Signature

```python theme={"system"}
GeoDataFrame.sindex: SpatialIndex
```

## Returns

<ResponseField name="return" type="SpatialIndex">
  The spatial index.
</ResponseField>

## Examples

```python theme={"system"}
>>> from shapely.geometry import Point, box
>>> from sedona.spark.geopandas import GeoSeries
>>>
>>> s = GeoSeries([Point(x, x) for x in range(5)])
>>> s.sindex.query(box(1, 1, 3, 3))
[Point(1, 1), Point(2, 2), Point(3, 3)]
>>> s.has_sindex
True
```


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