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

> Returns a Series containing the Hausdorff distance to aligned other.

Returns a `Series` containing the Hausdorff distance to aligned `other`.

The Hausdorff distance is the largest distance consisting of any point in `self`
with the nearest point in `other`.

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

## Signature

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

## Parameters

<ParamField path="other" type="GeoSeries or geometric object" required>
  The GeoSeries (elementwise) or geometric object to find the
  distance to.
</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>

<ParamField path="densify" type="float" default="None">
  The fraction by which to densify each segment. Each segment will be
  split into a number of equal-length subsegments whose fraction of
  the segment length is closest to the given fraction.
</ParamField>

## Returns

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

**See also**

* `GeoSeries.frechet_distance`

## Examples

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

```python theme={"system"}
>>> s1.hausdorff_distance(s2)
0    2.0
1    1.0
dtype: float64
```


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