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

# GeoSeries.frechet_distance

> Returns a Series containing the discrete Fréchet distance to aligned other.

Returns a `Series` containing the discrete Fréchet distance to aligned `other`.

The Fréchet distance is a measure of similarity: it is the greatest distance
between any point in A and the closest point in B. The discrete distance is an
approximation of this metric: only vertices are considered. The parameter
`densify` makes this approximation less coarse by splitting the line segments
between vertices before computing the distance.

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

## Signature

```python theme={"system"}
frechet_distance(other, align=None, densify=None) -> pspd.Series
```

## 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 densify parameter is not supported by Sedona.
  Passing a value will raise a `NotImplementedError`.
</ParamField>

## Returns

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

**See also**

* `GeoSeries.hausdorff_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.frechet_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.